The OpenURL action button in dbFront 1.2.2.1247 now supports direct download of local file:// resources.
Three specific safeguards are implemented.
- The file must be recognized by dbFront as a legitimate data file or image. e.g. DOC, PDF, XLS, JPG, PNG, etc...
- The path must be registered in dbFront. The setting is configured in [Help]/[Settings]/[Attachments]
- Most of the path can be hidden within the OpenURL configuration so users are unaware of the location.
NOTE: This functionality has not been implemented for URL fields because it represents a significant risk. Not only can the users see the full local path but if the field is editable then they could potentially download any file of their choice.
Configuration
To allow the download of PDF files from the folder c:\documents\
, would you need to do the following.
- Add the file mask "
c:\documents\
*.pdf
" to the Local File Download list in the Attachements Tab of the Settings Dialog.
- Create a OpenURL action button. For details see: OpenURL Action Button
- For the URL enter "
file://c:\documents\{0}
",
- Select the field that will contain the actual file name.
- Save the new button.
Assuming that the filename in the field exists and matches the mask then the user will be able to download it.