[Zope] Upload file to server for encoding...

Nick Gr skoupi at gmail.com
Mon Sep 11 10:46:18 EDT 2006


>> Using ExtFile I just could have access to my file systems, how can I 
>> use it to upload a file from my website visitors pc ?
>
> You use an html form to get the user to specify which file they want 
> to upload from their pc.  Your form handler routine will receive a 
> File upload object, here's some info on this:
>
> http://www.zope.org/Members/Benno/FileUpload
>
I just used this code to upload the file, but the file is uploaded in 
the Zope file system. If I want to use my python program for the 
encoding (or my python external method) , the file must be in my 
computer file system out of Zope right ?
>>>> C -> I think I will need also some kind of progress indicator so 
>>>> the user can know when the encoding is done (some time takes more 
>>>> than a minute)
>>> This may help:
>>>
>>> http://www.zope.org/Members/don/long_procces
>> That's a solution but do you know something more GUI like a progress 
>> bar ?
>
> Do a google search for:  zope progess indicator
Working on it...
>>>> . Any ideas how the user will download back the file? should the 
>>>> download begin automatically after the encoding ?
>>> If your external method commits the transaction, a new zope object 
>>> will be created.  You could then do a response.redirect that causes 
>>> the user's browser to access the new object.
>>>
>> My python program change the original file, it doesn't create another 
>> one after the encoding. Can I use the same Zope object or it doesn't 
>> work that way ?
>
> If the changes have been committed to the zope object, then when the 
> user accesses that object the user will see the changes (just make 
> sure the cache control headers are set so that the original object 
> does not get cached in the user's browser)
>
Can't follow you on this one clearly... I think if I can accomplish the 
previous tasks I should be able to do something with that.

Thank you Jonathan  ;-)



More information about the Zope mailing list