I have a table with a "Photo" field where the user uploads an image. The image is uploaded to a public folder, and anyone with the link can view it. But now I need to make it available only to authenticated users. How can I do with ANM tools? Some idea?
Protected image access
-
- User
- Posts: 106
Ok thank you.
1)In practice what does this option?
2)Using ANM in VIEW page for UPLOAD TO FOLDER fields to view the image in the code there is an A HREF tag which points to "api/file/[token]", instead to point directly to the explicit folder and file name. Is there any ANM function to produce this piece of code in my custom pages also?
-
- User
- Posts: 1018
- The Encrypt file path option encrypt the image url so that the user cannot inspect the image url in the browser and directly access it. It can be enabled in Tools -> Advanced Settings -> Encrypt file path.
- For custom file, you need to encrypt and decrypt on your own (e.g. using the default Encrypt/Decrypt function).
-
- User
- Posts: 1018
You need to create your own API action to server the file. Please read:
https://aspnetmaker.dev/docs/#/api.html ... api-action