Import Scripts and storing assets in the file system not database


(James) #1

Hi,


Is it possible to use the import scripts but store the files in the file system and not the database?



(so assets will have _data for the file sytem in the URL)



This is to improve performance if possible.



Thanks


(Nic Hubbard) #2

[quote]
Is it possible to use the import scripts but store the files in the file system and not the database?



(so assets will have _data for the file sytem in the URL)



This is to improve performance if possible.

[/quote]



You mean store all asset types in the file system? This isn't possible, and I really really don't think that this would improve performance to read off of disk instead of the DB when getting an asset.



Are you having performance issues?


(James) #3

Thanks for the reply. It was suggested to me as a way of improving performance. It's just for files that have been uploaded via one of the Squiz import scripts, such as PDFs. I would have thought as we have a Squid Proxy in front of Matrix the number of static files that actually come from Matrix is quite low anyway. I hope that's the case anyway. We are still building our site so just looking for suggestions on best practice.


(Nic Hubbard) #4

[quote]
Thanks for the reply. It was suggested to me as a way of improving performance. It's just for files that have been uploaded via one of the Squiz import scripts, such as PDFs. I would have thought as we have a Squid Proxy in front of Matrix the number of static files that actually come from Matrix is quite low anyway. I hope that's the case anyway. We are still building our site so just looking for suggestions on best practice.

[/quote]



Files assets are served by the file system. Best practices is to make the files live with Public Read permissions so that they have __data URLs and will be served by Apache.


(James) #5

I was told if you add them via the import script though they get _media instead which shows they come from the database even with public read permissions, is that not the case? We have hundreds of PDFs to upload so don't fancy doing it manually, which would definitely give them _data URLs.


(Nic Hubbard) #6

[quote]
I was told if you add them via the import script though they get _media instead which shows they come from the database even with public read permissions, is that not the case? We have hundreds of PDFs to upload so don't fancy doing it manually, which would definitely give them _data URLs.

[/quote]



No, I have NEVER heard that before. They would most likely get created as Under Construction which would give you a _media URL if they are in the media folder. But you just have to cascade a Live status and Public Read and they will become __data URLs.



Which import script are you trying to use? I would just recommend using the Bulk Import tool to do this. Just FTP all the files to your server then import them. Super easy.



BTW, who is telling you these things?


(James) #7

http://manuals.matrix.squizsuite.net/server-administrator/chapters/import-scripts#import_files.php


I think I need to check the URLs to see for myself. Just another Squiz user (nobody connected with Squiz).



I think it can wait until Monday, I’ve got to put the tree up this weekend, far more important :D



Thanks for your help.


(Nic Hubbard) #8

[quote]
http://manuals.matrix.squizsuite.net/server-administrator/chapters/import-scripts#import_files.php



I think I need to check the URLs to see for myself. Just another Squiz user (nobody connected with Squiz).

[/quote]



Yeah, just use the Bulk File Import tool for this, not the script. SO much easier.