You can't offload the upload to a task in a separate process: there would 
be no socket to munge the data in :D
Use modern js solutions to return information to the user for multiple 
uploads and a custom action.... and use a real webserver in front of web2py 
(read: nginx) that will buffer the input before passing it to web2py.

On Thursday, August 25, 2016 at 12:51:04 PM UTC+2, Mirek Zvolský wrote:
>
> I heard much about timeout of web request (like 60s) and about the need to 
> use scheduler if the action is slow.
> But I'am not sure about large file uploads.
>
> Is the file send to the server during http request or when I ask .read() 
> (or .value) in the controller? Should I take care about time of the action?
> And: how to give info to the user about the running upload?
>
> 1)
> What if I use standard Web2py upload fields in forms?
>
> 2)
> What if I use <input name="fldname" multiple>?
> I think there is no built in support for this in Web2py, so I have this in 
> view and handle it in the controller so:
> if request.vars.fldname:
>   for f in request.vars.fldname:
>     fn = f.filename.lower()
>     with open(os.path.join(uploadfolder, fn), 'w') as fw:
>       fw.write(f.value)
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to