[Zope] dealing with file downloads and uploads

Samuele Giovanni Tonon samu at sferacarta.com
Thu May 13 08:43:59 EDT 2004


hi,
i have to work with files using zope, but i have some problem:
i have one form in which you upload a file, then after the upload
i have to parse (following instruction from the user) the file before
inserting some of the data of it into a sql table.
The problem comes when i have to pass the file from one form 
to another (this forms gives me instruction on how parse it) .

I thought of some ways on how to deal with it but i don't know
which one is better:
- pass the file inside context/SESSION (but if the file is large
and the connection is not good it could be slow)
- create a temp file on to the filesystem (someone told me it coudl be
dangerous and it's better not to use it)  
- create a temp file inside Zope (how? the module File seems 
  not to have api that delete or truncate file isn't it ?) 

Also the same problem apply on to the download of a file that
is like a csv (i found csvtool that handle this situation pretty well,
however i'm curious on how to solve the problem with a
any file) .

Ah, i'd like to do everything without using dtml if possible.

Any suggestion, code to look, web pages? 

Thanks
Samuele





More information about the Zope mailing list