More in this section
Forums / Developing with Sitefinity / Bulk upload to custom module: picture associations

Bulk upload to custom module: picture associations

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
1 posts, 0 answered
  1. Stuart
    Stuart avatar
    33 posts
    01 Nov 2012
    04 Dec 2012
    Link to this post
    I have created a custom module that includes images, along with short and long text fields. I've seen examples on using code to create data items within some of the existing modules, including uploading pictures to the photo library, but I'm not sure how to upload a picture and have it link to a record in my custom module. Looking at the tables created for the module in SQL, I see one table for the data, and one table each for each of the image fields (there are three) that has the GUID for the data item and the GUID for the picture in a many-to-many type relationship. 

    What I would like to be able to do is iterate through a .csv that contains all of the data for the content type, as well as paths to the images, create each of the items and link them to the pictures. I have about 400 items to create, so doing it by hand is not an inviting prospect. I was hoping someone could point me in the right direction of establishing the link between the pictures and the data item.

1 posts, 0 answered