Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

Most browsers support base64 decoding, so you could very easily just point to the base64 data directly.

You might want to checkout base64 in internet explorer: http://dean.edwards.name/weblog/2005/06/base64-sexy/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top