Store Attachments In File System
From AdempiereWiki
Contents |
New Functionality: Store Attachments In File System
What?
Allows to choose the store method of attachments on a client level. User can choose to save the attachments in the database (as now) or to save them in the file system. Attachments are stored in a folder tree: %ATTACHMENT_ROOT%/CLIENT_ID/ORG_ID/TABLE_ID/RECORD_ID/
Why?
This helps to redeem the restrictions of db size (Oracle XE) and allows easy access to the attachments from other applications or file explorer.
How?
- Log in as client admin.
- Navigate to System Admin → Client Rules → Client
- Select 'Store Attachments On File System', this will show you a warning.
- Enter the windows and unix path to your new ADempiere attachment folder: e.g. 'H:\adempiere\attachments\' and '/adempiere/attachments/'
- Save your changes.
New Attachments will be stored in the file system.
Beware!
If you change the attachment path you have to move the files from the old to the new folder by hand. If you change the storage method the client can't access the old attachments anymore. We plan to provide a conversion procedure for that issue as soon as possible.
Security Issue
Discussion on this issue in course in discussion tab
- This approach also implies a security risk given that all users must have access to folder where attachments are located.
- In database users can access attachment only via the corresponding record (or Attachment window).
- With this approach users will have access to document via normal explorer folders.
- Consider this carefully if you are going to save confidential documents.
Workaround
- A possible workaround for this is configuring access to folders - hard to maintain but possible. Just the issue of Adempiere record locking left unsolved with this workaround.
