Folder and subfolder uploads
Hi,
I want to create a structure like this :
date of the day / subfolder
Each day, the first folder will change dynamically.
It works but I cant find out how to specify a subfolder then...
Here is my code for the primary folder.
folder: formatDate(new Date()),
I try to get something like that :
folder: formatDate(new Date()),/subfoldername
Is it possible ?
Thank you
-
Official comment
Hi Salou,
Yes, you can set the folder path on the uploads by creating a value for the "folder" parameter , where your code chooses that value based on the current date or some other requirement that you have
If you encounter any difficulties with that please let us know
Regards,
Stephen -
Hi,
Thank you for your reply.
I had already created a value for creating a folder by date. But I can't figure out how to create the subfolder after this created value.
folder: formatDate(new Date()),
This works and create a folder with the date of the day.
But if I try to create a subfolder, it doesn't work. What's wrong with my code ?
folder: formatDate(new Date()),/nameofsubfolder
Thank you for your help !
0 -
Hi Salou,
It seems you are passing an integer as part of the `folder` and the concatenation seems to not work as well.
Could you please try something like this?
folder: "" + formatDate(new Date()) + "/nameofsubfolder"
Thanks,
Loic
0
Post is closed for comments.
Comments
3 comments