I have started using the Store Pictures in the FileSystem functionality rather than the DB and I am very curious where the best place is to store them and also naming conventions for the Pictures from a Best Practice perspective.
As I see it.....I think there is no argument from the outset that it is better to store them in the filesystem rather than the DB purely from the point of avoiding DB bloat. However, the fact that it was supposed to also avoid the the image remnants accumulating in the webapps/AwareIM folder was attractive.
BUT, as I understand it....
Let's call the webapps/AwareIM Folder... "The Wall"
North of The Wall is off limits....a mystery so to speak to the outside world. The is everywhere between C:\ ..... and webapps\AwareIM
South of The Wall is Westeros..... fully explorable for those Brave enough.
Hence, if I save a Picture South of The Wall then it can potentially be Viewed and Download by ANYBODY in the Seven Kingdoms.
For example.... save a photo called MyPhoto.jpg to C:\AwareIM\Tomcat\webapps\AwareIM\Custom\CSS\mybusinessspace\images\MyPhoto.jpg
Now enter the URL in a Browser https://mydomain/AwareIM/CustomCSS/mybusinessspace/images/MyPhoto.jpg and your image will display in the Browser.
So, this is fine for Aware because it no longer needs take a copy of the image from the BD and place it South of The Wall to display it in the Browser. It is immediately available and no image remnants are created.
To my mind this creates a dilemma depending on the sensitivity of you images/pictures/photos.
For example:
Sensitive Images
Passport Images
Personnel Images
License and Permit Images
Non Sensitive Images
All images that are of "things" or "places" rather than people.
So, am I right in saying that ALL Sensitive Images should be saved North of The Wall and ALL Non Sensitive Images can be saved South of The Wall?
If that is correct, then, for Images North of the Wall... you retain the advantage of getting them out of the DB but lose the advantage of zero remnants South of The Wall being created.
IMAGE FILE NAMING CONVENTIONS:
Which brings me to the next point..... FileSystem Paths.
This is applicable for both North and South of the Wall...
I upload and Image to the app...
When first created the RULE is ...
If Employee.PictureFull WAS CHANGED Then
Employee.PicturePath=SystemSettings.PathIMAGESSecure+Employee.ID+FILE_NAME(Employee.PictureFull)+'.'+FILE_EXTENSION(Employee.PictureFull)
This puts the image in the correct location and names it correctly....
For example.....it can be seen in the folder as 1298956me.jpg
and the FilePath = C:\MYDOCUMENTS\MYBS\SECUREIMAGES\1298956me.jpg
BUT, now if I EDIT the Form that has that image on it again.... AND DO NOT CHANGE A THING... JUST CLICK SAVE...
Aware executes the Rule AGAIN (EVEN THOUGH NOTHING WAS CHANGED) and creates another file called
1298956
And the FilePath = C:\MYDOCUMENTS\MYBS\SECUREIMAGES\1298956.
Sorry for this being so long by would be very interested to get some feedback and would love to establish a "FileSystem Images Best Practice" document that can be shared across the entire 7 Kingdoms.
Cheers,
Mark