views:

177

answers:

2

I have a form that Legal will use to track trademark claims. They want to be able to attach logos to this for for easy reference. It's easy enough to create a file attachment, but is there any way to show a preview of the attached image?

The solution has to be usable in a browser enabled form.

A: 

You could add a link column (named preview) to your form library that leads to an .aspx page in the layouts directory, where you read the form xml and generate a preview of the document including the attachment previews.

This way you are able to handle the different attachment formats (e.g using C# code) and bypass the limited functions of the form service.

You could add a "edit this form" button to that page that redirects to the original formservice url.

MrFox
A: 

Attachments are stored in base64 format. You'd need to somehow post that data to the server, encode it correctly, and send it back to the client as a jpg. It's a bit of work, but i'm sure it's doable.

Jason Watts