Jump to content
  • 0

Import files then insert into table



I was trying to figure out how to insert a large number of photos (>1000) into a table of staff.

I could successfully import the files into caspio bridge, but could not find a documented way to automate the process of inserting these into the table. Support did not think it was possible, but I was able to find a solution!

Posting this in case it is helpful for others.



1. Ensure each file is named in a way that allows it to be linked to the rest of the data. In my case I named each file with the linkage key 'staff_id' e.g. "1.jpg"

2. Upload the files into a folder in Caspio bridge, as documented elsewhere. In my example, this is /photos/.

3. In the table, create a formula field that generates the path of the file that corresponds to the record. E.g. in my dataset, the path for the correct file is "/photos/1.jpg"; where staff_id = '1'. The formula is:

'/photos/' + CONVERT(VARCHAR, [@field:staff_id]) + '.jpg'

4. Save this field. It should now contain a generated list of paths.

5. Go back to the Table Design section and change the field type from "Formula" to "File". It will convert the type to "File" but retain the path data and now the file is correctly embedded.


I have suggested that Caspio support add this to their documentation as I think it could be a very useful feature.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...