Password-Protect Download Button
How can I password-protect a button that, when clicked, downloads a file from the database?
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
How can I password-protect a button that, when clicked, downloads a file from the database?
Hello Mike,
Hope this link will help: https://getsatisfaction.com/apperyio/...
Evgene,
Sorry I wasn't clear on my previous question.
I have a button that opens a file from my database on click event. However, I want to display a password input dialog box when button is clicked so that the user has to enter a correct password in order to open the linked file. Does this make sense? The user needs permission to open the file.
Hi Mike,
Files collection has "acl" field.
You can set this field like you need and control access by internal users mechanism.
Please read more about acl here http://devcenter.appery.io/documentat...
Regards.
Yurii,
Does this mean that a user already has to be logged into the app?
Hello Mike,
Not necessarily. You don't have to register every user. You may have a service account and the user will get the file by entering under this account.
I'm currently using a universal login and password for my app (1 user) because there are download links to sensitive files.
Instead of having to log into the app on startup, I want to have a password popup box that fires when the download button (to a sensitive file) is clicked.
Am I still going the route of the "acl" field? If so, what else do I need to do besides adding the following to the files' "acl" fields?
{"USER _ID":{"read":true,"write":false}}
Hi Mike,
If file has some limitations for read you have to pass "sessionToken" in this link.
Make direct URL with following way: /[fileName]?sessionToken=[userSessionToken]]https://api.appery.io/rest/1/db/files...
See details here: http://devcenter.appery.io/documentat...
So you can use following use case:
Before user starts to download the file app shows him some dialog form where he can specify login and password.
With this form user logins into db and get session token.
Then you can make direct link in way described above. And user can download the file with this link.
Regards.
Yurii,
How would I implement the dialog box with the password input field only (no username)?
Hi Mike,
If I understand you correctly, you could probably use the same username as a password.