Hi,
I am building a GET server action download.php that should do the following:
- Restrict access to loggedin users
- Check the attachments table to see if the $GET.attachment_ID is owned by the loggedin user ({{siteSecurity.identity}}
- Retrieve the file path from the attachments table
- Output the corresponding file using the readfile php function
While it is straightforward to do steps 1, 2 and 3 using Wappler, I am not able to do step 4.
I tried following: Secure File Download from a path outside of website root but their case is different as they use $POST and have their files outside of the website root (mines are inside)
Can you please advise on the most straightforward way to do readfile in Wappler?