Images

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 10, 2012   (RSS)

By design9 - February 9, 2012

I am importing in some data from an old CMS we used to have to CMS builder. The listings in the old CMS had images attached that were stored in a specific folder. Is there any easy way to link them all back up in CMS builder after I have imported the data so I do not have to go and put them back in seperately? I can still use the folder they are still stored in or copy to a new folder.

Thanks!

April

Re: [Tom P] Images

By design9 - February 9, 2012

How could I create a script if I do know which record num goes with the image? Does it matter that I go ahead and import data first so I can get the record number?

Thanks!

April

Re: [design9] Images

By (Deleted User) - February 10, 2012

Hi April,

Importing the data first without the image/uploads is fine. The next step would be to create a CSV of recordnums, the fieldname the files are being uploaded to, the tablename and the image filenames:
recordnum,table,field,image
1,records,uploads,image001.jpg
1,records,uploads,image002.jpg
1,records,uploads,image003.jpg
2,records,uploads,image004.jpg
2,records,uploads,image005.jpg
3,records,uploads,image006.jpg
4,records,uploads,image007.jpg


In the above we're adding the images to the field 'uploads' in the table 'records'. This assumes all the images are in the same directory.

Creating the script is something that would take a bit more time and space than we have available in the forum - if you aren't comfortable trying it yourself we could look at building one for you but that would be more of a consulting request than a help request.

If you'd like to ask for a quote, you can email consulting@interactivetools.com with the details (just include a link to this thread).

Of course, if someone has already written a function to do this then let us know!

Let me know if this helps,

Tom