you can specify the location
Field('name','upload',uploadfolder='...')
You should not specify your own filename.
The filename is generated so that:
1) is unique
2) is safe
3) upon download web2py can efficiently find the table, record and
field the file belongs to and figure out a) where the file is located;
b) who can access to the file
4) the uuid contains the original name encoded and they is used to set
the content disposition upon download.
On Nov 17, 4:23 pm, NuclearDragon <[email protected]> wrote:
> How can I specify my own filename and upload location for images? I
> can't find in the code where it is doing the upload/save/rename
> processes.
>
> I have a vague idea that it uses shutil somehow, but I just can't see
> where it is being used, or how to interrupt and redirect the process.
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" 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
-~----------~----~----~----~------~----~------~--~---