On Monday, January 7, 2019 at 8:14:39 AM UTC-5, Weronika Swiechowicz wrote: > > Hi. I am trying to allow the user to upload files using UI. If I cannot > search their filesystem the user will have to upload documents on the > machine where the server is run. That is not very helpful if UI is accessed > remotely. >
It's still not quite clear what you are trying to do. Your code looks in /applications/mcarriage_console/uploads, which looks like a web2py folder you would find on the server, not a folder a user would have on their own machine. Where exactly are the files of interest? If they are on the end-user's machine (e.g., a personal laptop), you simply cannot read their filesystem via the browser -- this is a security feature of all browsers. As Val K pointed out, you can use webkitdirectory <https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory>, but it only works in Chrome, and it still requires the user to manually select the given folder via an input dialog -- it simply enables you to read all the files in a single folder (but you still cannot read any arbitrary folder on the user's machine without them first making a selection). Anthony -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.