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

Jonathan dev101 at magma.ca
Mon Sep 11 08:27:59 EDT 2006


----- Original Message ----- 
From: "Nick Gr" <skoupi at gmail.com>
To: <zope at zope.org>
Sent: Monday, September 11, 2006 8:08 AM
Subject: [Zope] Upload file to server for encoding...


> Hello Zope community,
>
> I just installed  Zope-2.9.4 in a windows XP SP2 . I'm making a web site 
> that the visitors should:
>
> A) Upload a file to the server
>
> B)After the file is uploaded , I have write a python program to encode the 
> file
>
> C)When the encoding is finish, user must download the file back to his 
> machine.
>
> I'm very new to Zope and I choose it because I thought it should have an 
> easy and good communication with python. Since I have terminated the 
> python program that does what I want, I have no idea how to accomplish the 
> requests above.
>
> A -> I know I will need external access to the file system, is there a 
> product that can help me in that ?

LocalFS and ExtFile are a couple of options.



> B -> my program works as I want like a python program , it will need any 
> modification so I can use it in Zope ?

Look into External Methods



> 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



>. 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.


hth

Jonathan 




More information about the Zope mailing list