Using CPVWP as list attachment previewer

Mar 25, 2009 at 1:32 PM

Hi there

Thank you very much for this web part. It is extremely useful.

I am trying to use it to preview attachments to a list and I'm having some trouble with the URL. All attachments for a list are stored in a folder called attachments and a sub folder which is the documents id. How do i make it pickup the actual attachment in the id folder and display it. The URL I have entered is http://mysite/Lists/test/Attachments/{ID}/{filename}. Unfortunately i cant seem to find the field that the actual file name is stored so i was hoping if i just used filename it would work, but it doesnt. Any assistance will be highly appreciated. I am also open to any recommendations of how i can do this in another way.


Mar 26, 2009 at 3:14 AM

I do not think the attachment filenames are stored as fields in the list, especially since there can be multiple attachments associated with each list item.

Only visible fields in the out-of-the-box list view are sent as parameters over the connection to the CPVWP.

I think the only way to do what you want to do is to write a custom web part that uses the Sharepoint API to get one of the filenames attached to a list item and send it across the connection.