Brian Sullivan wrote:


how do i upload a file in Zope using a python script??


http://www.zopelabs.com/cookbook/1006887320

is probably a place to start.

On that topic: I've got my file upload working properly (it forwards the file data to an external site, then saves only if validation works).

But I just started to wonder about something; all my tests have been with relatively small files (~40KB) but my end users may be uploading some very large files (possibly as large as 500KB, although not for months).

In my python script I use:
   filedata = container.REQUEST.file.read()
then merge this data into a MIME submission for the external web site, and on success, save it locally as a "file".

My question is -- aside from memory usage, what problems might there be with this approach?

Will the "read()" return all the content, or is there a possibility that it will return less than the full file contents? Any timeout issues that I should consider?

I can test with large files, but can't really emulate internet network latencies.

Thanks,
Nikko



_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to