Page 1 of 1

How to prevent downloading uploaded files without login?

Posted: Thu Oct 19, 2017 8:27 pm
by mpol_ch

Hi,
I am going to create a small application with PHPMAKER.
The users will upload attachments such pdf, docx, and xlsx files as file.

How can I make sure that the uploaded files are only downloaded if the user is logged in with PHPMAKER application.
I want that such files are not going to be downloaded without authentification by phpmaker application.

Please advaise what could be the best way to have with PHPMAKER.

thank you.

mpol_ch


Re: How to prevent downloading uploaded files without login?

Posted: Fri Oct 20, 2017 9:47 am
by mobhar

There is a Javascript variable named "EW_IS_LOGGEDIN" that you can use to determine whether the user is logged in or not.

You should be able to use this variable by using onclick event of the download link. Use "Startup Script" to write your jQuery code to implement the logic.