Great input! I think I will try the following: Create a special directory to store the data. Setup a special controller with the needed permissions and conditions. Have fun and do a little dance. Does this sound sensible? BR, Jason
On Sun, Nov 10, 2013 at 2:43 PM, Niphlod <[email protected]> wrote: > > > On Sunday, November 10, 2013 7:49:00 AM UTC+1, Encompass solutions wrote: >> >> I need a way to make downloads private/one time for the user. >> What is the best practice for this? >> * Should I need a special download script? My guess is yes. >> * Should I have a special directory and how would I best do that? >> > > unless stored under /static/, no. web2py has no knowledge (so, the > end-user doesn't either) of files outside the /static/ dir except for > uploads/, that you can however "restrict" in any way you want through the > "normal" auth permission scheme. > > >> * Is there a way to create one time downloads without authentication? >> Some of my cases will need authentication and some not. >> > > in that case you surely have to serve files with your own controller > checking for custom authorizations and such. BTW, one time dowloads are > either hard to achieve or (from the end-user perspective) hard to offer. > Several browser's extension download files with multiple connections to > speed up the retrieval and so you can't just rely on accepting only the > first request coming from that particular file (or those tools will > probably error out as soon as the second connection is initiated). Usually > instead of one-time-only downloads sites serve expiring links (i.e. "you > can download it only for the next two days") coupled with a sane amount of > trials (let's say 10, if files are not huge). > > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/JtlqR-WWicQ/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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/groups/opt_out.

