I'm not sure it's considered part of the public API (it's not in the book), but you can do:
filepath = db.mytable.myupload.retrieve_file_properties(row.myupload)['path' ] The returned dictionary also includes a "filename" key, which holds the decoded (i.e., original) filename. More generally, when uploadseparate=True, the filepath is /path/to/uploadfolder/tablename/fieldname/uuid[:2], where uuid is the 16-character UUID segment in the stored filename (i.e., tablename.fieldname.uuid.base64encoded_filename). Anthony On Tuesday, December 27, 2016 at 9:51:45 AM UTC-5, Manuele wrote: > > Hi! > > Other than the methods "store" and "retrieve" of a field is there a > programmatic way to get from a row just the path where a file is stored > on the filesystem (expecially when uploadseparate option is set to True)? > > > Thank you very much > > Manuele > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

