You could follow this method to store the original filenames: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Storing-the-original-filename.
Anthony On Monday, August 3, 2015 at 3:52:19 PM UTC-4, Vladimiras Lomovas wrote: > > Thank you for such quick answer. > Could you suggest solution(or where to look) on returning list of uploaded > files(without renaming them or otherwise) for the user to view or download > them? > > > On Monday, August 3, 2015 at 3:55:12 AM UTC+3, Massimo Di Pierro wrote: >> >> web2py exposes only actions, not all functions. An action is a function >> in a controller that takes no arguments and does not start with two >> underscores. >> >> Be very careful with using the original filename as name of the file. >> There are many possible vulnerabilities associated with this behavior, >> including directory traversal. This is why most frameworks, including >> web2py, rename files on upload. Consider that the sender can inject any >> character it in filename and that character may have a special meaning on >> your filesystem (think of / \ : for example). Also consider a file with >> that name many already exist. >> >> Massimo >> >> >> On Sunday, 2 August 2015 18:56:37 UTC-5, Vladimiras Lomovas wrote: >>> >>> >>> <https://lh3.googleusercontent.com/-rj-e4oMWCIk/Vb5xxX8VZRI/AAAAAAAAACo/pnTUX_lqYA0/s1600/nolist.jpg> >>> >>> Hello I'm new to programming and web2py but here I'm doing my first >>> project. >>> I'm using web2py as a back-and for android app to get and transfer data. >>> I need to return list of user uploaded files( in JSON ) but web2py save >>> files with unique name. >>> I find most accurate solution to my problem: >>> http://stackoverflow.com/questions/8008213/web2py-upload-with-original-filename >>> >>> but it's not working for some reason >>> and some functions is not listed in "exposes:"(shwon in picture). why? >>> >>> -- 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.

