Check this section of the book: 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#More-on-uploads

Rather than opening an existing file, you can create a file-like object via 
cStringIO.

Anthony

On Tuesday, May 3, 2016 at 9:53:31 PM UTC-4, aetagot...@gmail.com wrote:
>
> I would like to open and write to a new file after accessing form 
> variables passed from views...
>
> I've been trying to find a similar problem, but not much luck ..
>
> I suppose I can create another table with tempfile field of type uploads, 
> and then do a database controller within the controller..
>
> However I am wondering if there is an alternative way, where I just create 
> the file object and send it to the uploads folder?
>
>
> Thank you
>

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