Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a list definition that will have a title, description, and a few picture fields. Each entry in the list will represent a project. I do not like to use the SharePoint hyperlink/picture field type so instead I'm using the image upload from Bernado Nguyen-Hoan's Blog. I've got an instance of the list, along with the list definition, that deploys with my visual studio solution. However, when I go to the list to create a new item and I upload the image to my column it throws an error because no library has been specified where I can store the images. The field type is supposed to default to the "Images" library but when I go to edit the column I see that the "Upload Images To" field is blank. How can I set this in my list definition schema.xml/elements.xml files?

enter image description here

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I found two great blog articles on how to accomplish this (though don't do everything in the articles because he tries a lot of things before finding a solution).

Article 1

Article 2

Inside of the Field tag in your Elements.xml and Schema.xml files you will have to add the following xml:

<Customization>
  <ArrayOfProperty>
    <Property>
      <Name>UploadImagesTo</Name>
      <Value
        xmlns:q1="http://www.w3.org/2001/XMLSchema"
        p4:type="q1:string"
        xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">Images</Value>
    </Property>
  </ArrayOfProperty>
</Customization>

The only thing that will change when you customize it for yourself is the name of the property ("UploadImagesTo"), the p4:type ("q1:string"), and the value ("Images").

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.