if you just say

form=FORM(INPUT(_type='file',_name='data',requires=IS_NOT_EMPTY
()),INPUT(_type='submit'))
if form.accept(request,vars,session):
     filename=form.vars.data.filename
     data=form.vars.data.read()
     # do what you want with it

if you use form=SQLFORM or form=form_factory is handles the secure
file upload, renaming and saving for you.
The file goes in yourapp/uploads or in database (as explained in the
manual). You cannot change the location but you can move the file
after accept.

Hope this helps.

Massimo


On Nov 26, 11:30 pm, somebody <[EMAIL PROTECTED]> wrote:
> input type "file" is to choose a file to be uploaded then wad input
> type is used to select a directory where a file wan tto be saved to?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to