[Grok-dev] Re: absolute url for 'static' ?

Sebastian Ware sebastian at urbantalk.se
Sun Apr 27 15:11:34 EDT 2008


I was under the impression that storing large amounts of data, such as  
large blobs, will bloat Zodb and adversely affect performance.

Another reason for me to store files (such as uploaded images) in the  
filesystem is because it is easy to configure rewrite rules to bypass  
the application server in order to serve images in high volume  
scenarios (instead of using a cache on the front side; simplicity  
wins...).

Is it better to go the route suggested in the "accessing the parts  
directory" thread?

> Christian Theune schrieb:
>
>> True. As a note how to solve his specific question, he can use the  
>> products
>> section in zope.conf generated by buildout:
>> (this is pseudo-buildout)
>> zope.conf = ...
>>    <product-config joachim>
>>    my-path ${buildout:directory}/parts/foo
>>    </product-config>
>> Then in your code, you can retreive this data using:
>>    import zope.app.appsetup.product
>>     
>> zope 
>> .app.appsetup.product.getProductConfiguration('joachim').get('my- 
>> path')
>> Christian


Mvh Sebastian

27 apr 2008 kl. 19.50 skrev Christian Theune:

> On Sun, Apr 27, 2008 at 07:37:04PM +0200, Sebastian Ware wrote:
>> I use subdirectories of the static directory to store files that are
>> uploaded by users. Is this a bad idea?
>
> Extremely bad. Actually, you shouldn't assume those locations are  
> writable.
>
> And also: We have Blobs!
>
> Christian
>
> -- 
> gocept gmbh & co. kg - forsterstrasse 29 - 06112 halle (saale) -  
> germany
> www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
> fax +49 345 122 9889 1 - zope and plone consulting and development



More information about the Grok-dev mailing list