Does wappler support creating dynamic folders?

I am trying to build a system with subscriptions, where each user can upload files, does Wappler support creating dynamic folders for example with the ID of the user when uploading?

Yes, you can use dynamic values in the create file/folder actions under file management menu in server connect.

Hi @lsadesl, I have not really tried it to be honest but if i recall correctly I made a mistake with choosing where to save my file at some stage and it made a folder structure for me.
This is where I set the path incorrectly that time, although there is no dynamic data symbol beside that property so I do not know if you could force it to take a parameter by manually typing in the dynamic data you want.
It does say create path so it should work.

Is there any tutorial for this or documentation?

Hi @psweb thanks, will try to find how with @Teodor comment

Found it Teodor, thanks

You can also use dynic path in file upload step, and enable “create path” option, so that it will create the folder on upload.


I am confuse on what steops to do here can you give me a pointer?

Hi @Teodor thanks for the replay, another issue I am having is the post filed of the form is not listed when adding the file manager

Well I don’t see any post vars under globals in your server action at all. There are/is only get var(s).

Gotcha forgot I need to manually import from form, thank you for pointing that out @Teodor, now question I am following these instructions:

Is the correct way to use this if folder (/img/profiles/{{SecureUser.identity}}) exist —> add upload file to this folder directly --> update database

or else
create folder --> upload file --> move file to created folder --> update database

Would I do this on the internal steps the if condition in wappler adds?

I have images stored in a dynamic folder based on the year the image was uploaded, e.g. 2019
Now I need to show the images. I tried several things, but no joy.
This is the code I have now taking the date from the record that holds the image.
<img class="img-fluid" width="100%" dmx-bind:src="uploadartikel/{{[0].datum.formatDate("yyyy")}}/{{[0].afbeelding}}">

Can anyone tell me where I have gone wrong?

Found it: Had to replace " by " manually. Working now