I saw indeed that pictures are copied into tomcat directory, but are they kept there forever?
yep. one guy wrote a script to remove them.
or you can select and delete in Windows Explorer.
aware doesn't manage them.
(keep in mind that this issue goes back 10+ years. 6yrs ago or so Aware added images in FS. Recently added S3 storage.)
I mean, I am using an external network drive as repository for all my pictures and all my attachments, because my server HD is limited and I want to keep the repository separate anyway.
If all those pictures are going to be copied in the tomcat folder anyway, this defies my concept, and I going to need a huge HD in the tomcat server, isn't?
yes, if you used the default strategy.
And overall, what is the use of choose a filepath for an image in a file system, if they are copied at then end in the tomcat folder?
well, if your images were under Tomcat, they'd be served from their existing location. no copying needed.
you have a case where you wanted them somewhere else (diff. hard drive), so for most people, if they would have put them under Tomcat to begin with, they'd have never run across this.
I am going to do some research to implement the point 5 indeed. Thanks!
yes, Link directory is best solution.
However, it seems I would still have the trouble of having the pictures copied in the tomcat folder. Does it mean I have to manually delete them every once in a time?
The linked directory will be under Tomcat, so Tomcat thinks all is fine. But the images will really be in d:\UploadedDocs
Picture and attachments can be seen only by users authorized to access a specific project.
Also that means that unauthorized user that have a link to the picture can see the picture, right?
very true.
Tomcat doesn't require authentication to access a file.
You can use that link I suggested to access to the AwareIMLogo.png file from an incognito window, not even logged into your app.
Tomcat is just serving a file that was requested.
The public may not know the path to your attachments, but a logged in user will - anyone could see the path to an image on the screen.
If "project_001" was part of the path, it logical to assume there's also a "project_002" set of attachments as well.
So one user could guess at filenames to see what else is out there.
A safe way is just to append a random string (using aware's random function) to the filename and then its basically un-guessable.
The user uploads a file and you rename it.
A filename would become
d:\UploadedDocs\project1\PO1000_34Dth872yZ.png instead of
d:\UploadedDocs\project1\PO1000.png
You might post a new thread on the forum to get other suggestions. Something like "Suggestions for obfuscating filenames of uploaded files" might get you some feedback.