Hello everyone. I have a file system so structured:
client 1 / file.zip and file.txt
client 2/ file.zip and file.txt
client 3 / file.zip and file.txt
client 4 etc…
In the file.txt is stored an email adress.
I need to send an email to any client ( client1, client 2, etc ) with a donwload link for the corresponding file.zip. I want that the link could be used only for a period of time. So, looking around, I understood that the best way to do it , it’s to save in the database the path of file.zip, a date of expiration , an alphanumeric id, and , in my case , the adress email.
So , I don’t have any idea how to loop through the folders in order to save in the database a table like this:
id ---- path of file.zip , client 1 ------ email client 1, stored in file.txt ----- expiration date ------
id ---- path of file.zip , client 2 ------ email client 2, stored in file.txt ----- expiration date ------
id ---- path of file.zip , client 3 ------ email client 3, stored in file.txt ----- expiration date ------
Could you help me ?
Thank you