[Zope3-Users] Uploading files

Tarek Ziadé tziade at nuxeo.com
Thu Jun 1 10:59:42 EDT 2006


Stéphane Brault wrote:

>Thanks Stephan,
>  could you indicate me another way to upload files ?
>  
>  Stéphane
>
>----- Message d'origine ----
>De : Stephan Richter <srichter at cosmos.phy.tufts.edu>
>À : zope3-users at zope.org; Stéphane Brault <stephane_brault at yahoo.fr>
>Envoyé le : Jeudi, 1 Juin 2006, 2h53mn 32s
>Objet : Re: [Zope3-Users] Uploading files
>
>On Tuesday 30 May 2006 09:30, Stéphane Brault wrote:
>  
>
>> for my application I mainly use sqlos and jsonserver, which means that I
>>don't use much standard Zope components, I need to let users upload a file
>>which I parse to update the database. I don't see how to upload files with
>>AJAX. Is there a way or should I go another way. I must say I don't know
>>how to do it the standard way.
>>    
>>
>
>While I hate AJAX with a passion, you could certainly do this. If JS has a way 
>to access a local file once it has been selected, then you can use the 
>XmlHttpRequest class to PUT the file on the server, for example. I certainly 
>would not use JSON for this task.
>
>Regards,
>Stephan
>  
>
You cannot upload file directly in javascript, because it can't reach
the file system to get the file (it's all about security)

the recipe is to use an IFrame in your form, to get back the hand into
the client,
then do what you need to do on client side while your file is beeing
uploaded.

What your precise use case ?

Tarek


More information about the Zope3-users mailing list