Hi guys,
I got a question to the asset configuration property "asset.server.max.generated.file.system.directories"
What's the usage of it? Is it a security setting? what is the risk to set it to 0?
Previously I asked a qustion "How to ftp upload bunch of images at one shot?" http://forum.broadleafcommerce.org/viewtopic.php?f=13&t=3157 and as a result of no replies, I trace into code myself.
So it shows that we can use local file system to upload a set of images, say your configuration for asset directory is
asset.server.file.system.path =/opt/instance/broadleaf/asset
therefore you can setup a ftp acces under this dirctory, then upload all your files.
Here in my understanding the files you upload can be any type even video (maybe? please correct me if I m wrong); but I didn't test it.
Then if you set
asset.server.max.generated.file.system.directories = 0
it tells the file service to ignore any generated path, just use the orginal local file path, which is under your asset directory.
For example, you upload images to /opt/instance/broadleaf/asset/images/1.jpg and /opt/instance/broadleaf/asset/images/20.jpg
then in the database store you will store
INSERT INTO BLC_STATIC_ASSET (STATIC_ASSET_ID, MIME_TYPE, STORAGE_TYPE, FULL_URL, NAME) VALUES (10001,'image/jpg','FILESYSTEM','/images/1.jpg','Test1 black');
INSERT INTO BLC_STATIC_ASSET (STATIC_ASSET_ID, MIME_TYPE, STORAGE_TYPE, FULL_URL, NAME) VALUES (10002,'image/jpg','FILESYSTEM','/images/20.jpg','Test2 black');
Now I think you can see the ftp uploaded images.
My question here:
What's the usage of "asset.server.max.generated.file.system.directories"? Is it a security setting? what is the risk to set it to 0?
NOTE: I wrote this just after I trace the code; haven't test my thought yet. Will update this after testing.
Regards,
Dan
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.