SQLFORM.factory(Field('the_file','upload',requires=IS_UPLOAD_FILENAME
()),uploadfield=False)

On Nov 23, 1:24 am, Iceberg <iceb...@21cn.com> wrote:
> I noticed that a file uploaded via SQLFORM.factory() exists in myapp/
> uploads. How to delete them automatically?
>
> By the way, shall the auto-deletion be web2py's default behaviour?
> Since using SQLFORM.factory() hints no need to keep those file at all.
>
> Code for reproducing the problem.
>
> def foo():
>   form = SQLFORM.factory(Field
> ('the_file','upload',requires=IS_UPLOAD_FILENAME()))
>   if form.accepts(...):
>     process_file_content_on_the_fly( form.vars.the_file.value )
>     delete_uploaded_temp_file(...) # but how?
>   return {'':form}
>
> Sincerely,
>              Ruijun Luo, 2009-Nov-22, 11:59(AM), Sun
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to