Discuss

Inserting Multiple File Names in a Database

On this page

You already know HOW TO UPLOAD MULTIPLE FILES TO YOUR SERVER so now we are going to show you how to insert their names or URLs to a database.

Open the Server Connect panel:

Screenshot_1|690x382

Select your server action, which uploads multiple files to the server and right click steps:

Screenshot_2|690x382

Open Database Actions and add Database Connection:

Screenshot_3|690x382

Make sure the database connection step is before the file upload step. If it is not, just grab it with your mouse and drag it in the first place in the action steps. Then define your db connection or select one if you have already defined it for this site:

Screenshot_4|690x382

Right click the file upload step:

Screenshot_5|690x382

Open Core Actions and add Repeat:

Screenshot_6|690x382

Then click the dynamic data picker, to select an expression for the repeat step:

Screenshot_7|690x382

Here, you should select the File Upload step. This means that the steps inside the repeat will be executed as many times as files are uploaded by the upload step:

Screenshot_8|690x382

Now, right click steps inside the repeat:

Screenshot_9|690x382

Open Database Actions and Add Database Insert:

Screenshot_10|690x382

Click the Insert Options button:

Screenshot_11|690x382

And select the table, where you want to insert the uploaded files' names or URLs:

Screenshot_12|690x382

Double click the value field and click the dynamic data picker icon:

Screenshot_14|690x382

Here, select either the name of the file, or its URL returned under the Repeat. We prefer to store just the name of the file, not the whole URL to it:

Screenshot_15|690x382

Click OK:

Screenshot_16|690x382

Save your server action:

Screenshot_17|690x382

And you are done!


WapplerPrevious|101x31   WapplerNext|77x31