Is there functionality that would enable the upload field to store files in a path relative to uploads? Kind of thing where, if the directory doesn't exist, it's created for you automatically? Making the uploads directory flat by default feels like a limitation to me.
On Sep 2, 11:26 am, mdipierro <[email protected]> wrote: > The fact is the function download needs to be able to locate the files > by filename. If you move them you either need to write your own > download action or you need to change the value stores in the upload > field to include the relative path. > > On Sep 2, 9:25 am, weheh <[email protected]> wrote: > > > > > I'm working on an app with some Scribd-like capability. I was going to > > put user files in c:/web2py/applications/myapp/uploads/users/userid/ > > fileid. Are you saying that if I do this then users wouldn't be able > > to download files? I would prefer not to keep the whole file system > > flat under uploads as I could end up with many hundreds of thousands > > of files, which could encroach on OS limitations. > > > On Sep 2, 1:30 am, mdipierro <[email protected]> wrote: > > > > Uploaded files are stored in the uploads/ folder and if you want to be > > > able to download them they should not be moved. > > > > On Sep 1, 11:54 pm, weheh <[email protected]> wrote: > > > > > How about moving the uploaded file around? Any recommendations for > > > > where it should or shouldn't be moved? > > > > > On Sep 1, 11:57 pm, mdipierro <[email protected]> wrote: > > > > > > You have to use SQLFORM.factory > > > > > > On Sep 1, 10:46 pm, weheh <[email protected]> wrote: > > > > > > > I'm trying to do a file upload via a FORM: > > > > > > > form = FORM(TABLE(TR(TH('Input File'),TD(INPUT > > > > > > (_type='file',_name='filename',requires=IS_NOT_EMPTY()) ... > > > > > > culminating in a submit button. > > > > > > > The form view looks OK, but when I submit the form, the file doesn't > > > > > > automatically get uploaded to the uploads folder. Is there a special > > > > > > parameter I have to pass to the INPUT to get it to upload a file? Or > > > > > > do I have to resort to SQLFORM.factory to do this? (There is no db > > > > > > behind the form.) > > > > > > > Also, once the file is uploaded, I'm going to want to post-process > > > > > > it > > > > > > and then move it. Is it kosher practice to move a file within the > > > > > > uploads folder to a subfolder within the uploads folder? How about > > > > > > moving a file to a location outside of the uploads folder?- Hide > > > > > > quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

