Save attached file (as they are) in a directory

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Sara
Posts: 3
Joined: 18 Jul 2017, 09:14

Save attached file (as they are) in a directory

Post by Sara »

Hi everybody, I'm new in this forum and I would like to have an help about attachment.
I've set the configuration to save attachment in folder.
Now in the destination folder I have the files attached named as

a9618c5b0c774737a6a39801acaa4f57
b8296fd33bec53a1fc0d67cbed7381f9
......

Mantis works great but I have to store the file as they are and not with coding the file name with alphanumerical method.

Is there a way to have the real file attached directly in the destination folder (for example file1.pdf instead of 36b381abcd4646f886eddaf4ca7106bb)?
If I manually rename the file it is good but I want to do this automatically.
Thanks in advance
Sara
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Save attached file (as they are) in a directory

Post by atrol »

Sara wrote:but I have to store the file as they are
This is not possible as users are able to upload files with the same name, e.g. typically there is more than one issue where someone adds a file named "bug.png".

Furthermore, someone who should not be allowed to see any content of your bugtracker might be able to list the contents of the directory or sees the names of the files on a backup list.
Seeing "a9618c5b0c774737a6a39801acaa4f57" would probably be much better in such case than seeing "Earnings_Sara.xlsx"
Please use Search before posting and read the Manual
Post Reply