Problems with file upload in Catalina

32 views
Skip to first unread message

Stephan

unread,
Nov 24, 2019, 12:17:49 PM11/24/19
to web2py-users
Hello,
with the latest web2py version and Catalina, I found that the file upload does not behave like before. When doing a file upload with sqlform grid, with the uploadfolder set to static "uploadfolder=request.folder+'static'" in the models, the files are stored outside the app, in a newly created folder 'staticapplicationname' in under the 'applications' folder instead of being stored in 'app/static'.
Thanks for your help.
Stephan

  

Stephan

unread,
Nov 24, 2019, 12:33:48 PM11/24/19
to web2py-users
I found out that setting adding a slash in the path fixes the behaviour:

  Field('logo', 'upload',  uploadfolder=request.folder+'/static/images'),
instead of
    Field('footer', 'upload',  uploadfolder=request.folder+'static/images'),
Does anyone know why all this is?

Val K

unread,
Nov 24, 2019, 1:14:13 PM11/24/19
to web2py-users
Use os.path.join() to build path
Reply all
Reply to author
Forward
0 new messages