[Zope] Serving external files

Tony McDonald tony.mcdonald@ncl.ac.uk
Tue, 28 Mar 2000 12:17:17 +0100


At 12:45 pm +0200 28/3/00, Allen Wallis wrote:
>Thanks -
>I have downloaded LocalFS, but haven't tried anything substantial with it,
>my reason being that I needed to upload these external files as well.
>A user must be able to upload a file, which will be saved to the local file
>system, and made available for download from the local file system. The
>actual path to the file will be stored in a relational database (along with
>a whole lot of other info). If I were to use the LocalFS product for this,
>is it possible to add a LocalFS object dynamically (through some dtml method
>that gets called when a user uploads a file)?

Yes, but just set up a LocalFS object from the management interface 
and don't worry about it. If you're worried about files cluttering up 
the filestore, use a cron job to wipe them out.

Or (better?), is it possible
to set up a LocalFS object dynamically only when a user wants to download a
particular file (once finished the LocalFS object is deleted). I ask since,
in my case there might be many files that are uploaded, and I'm not sure
what limits there are on the number of LocalFS objects that can be
maintained.


It uses python filesystem methods, so I reckon the number of files in 
a LocalFS object (ie the directory) is os limited.

I sent an email to the list on the 21st March where I had some 
(rudimentary) dtml and python code that uploads to a LocalFS object 
(ie the directory that the LocalFS object is pointing to). Check it 
out, the subject line is [Zope] Re: [Zope-dev] RE: ZDiscussions

hth
tone.
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2