How to prevent downloading uploaded files without login?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mpol_ch
User
Posts: 877
Location: Switzerland

How to prevent downloading uploaded files without login?

Post 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


mobhar
User
Posts: 11660

Post 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.


Post Reply