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?
1 Answer
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).
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").