Examining the code (and running some simple tests) reveals that Axelor is storing all uploaded files (attachments) in a single flat directory. This may me OK if you only need to store an occasional attachment once in a while. In my case however it is necessary to store between 2 and 10 (or sometimes even more) attachments on every quotation and/or sales order. This can result in several hundred thousands of files stored in a single directory, which will lead to performance issues (to what extent , it depends on the type of file system)
I would like to create a module to override the default storage scheme and split the files among several subdirectories but the class responsible for this (com.axelor.meta.MetaFiles) uses static methods to calculate the file path to store the uploaded file.
# Upload filename pattern, default is auto where file is save with same name
# in the given upload dir, if file is already there, a count number is
# appended to file name.
#
# This can be overridden by providing custom name pattern, for example:
#
# file.upload.filename.pattern = {year}-{month}/{day}/{name}
# file.upload.filename.pattern = {AA}/{name}
#
# Following placeholders can be used:
#
# {year} - current year
# {month} - current month
# {day} - current day
# {name} - file name
# {A} - first letter from file name
# {AA} - first 2 letter from file name
# {AAA} - first 3 letter from file name
#
#file.upload.filename.pattern = {year}-{month}/{day}/{name}
Hi @gdu-axelor
Is possible alsu using other placeholer, for example Timesheet Employees or something else?
I mean all file attached from employees goes in a folder for employees as well as for employee name.