Leonardo Rochael wrote at 2008-1-27 22:29 -0800:
> ...
>Closing the NamedTemporaryFile after consuming it and before opening the
>blob makes the matters worse, since Windows removes the file from under Blob
>*after* it has been consumed, so we'll have to think of a different strategy
>for consuming request files on Windows, but whichever strategy ends up being
>used, the problem remains that we cannot keep the FileUpload instance from
>the request open in 'w+' mode (readable and writable) while allowing the
>blob instance to be opened in the same request. So I'd like to ask some
>policy questions:
>1. Is it ok to close a FileUpload instance from the request?

I think this would be okay for "FileUpload"s the sole purpose
of which is to be consumed by a blob.

Of course, this must not happen for other "FileUpload" objects -- at
least not before the request is closed.

>2. Alternatively, is it ok to replace it on the request with a read-only
>file-like object with the same contents, or maybe even force it to be
>read-only to begin with?

I expect this to be safe for all "FileUpload" instances.

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

Reply via email to