InfoPath Attachment Preview

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

The solution must be used in a form allowed by the browser.

0


a source to share


3 answers


Attachments are stored in base64 format. You need to somehow place this data on the server, encode it correctly and send it back to the client as a jpg. It's a bit of a job, but I'm sure it's doable.



0


a source


You can add a link column (named preview) to your form library which will lead to an .aspx page in the layout directory where you read the xml form and generate the document preview including attachment previews.

This way you can handle different attachment formats (for example using C # code) and bypass the limited functionality of the form service.



You can add a "modify this form" button to this page that redirects to the original URL of the form.

0


a source


Most browsers support base64 decoding, so you can just simply point to the base64 data directly.

You might want to check the base64 in Internet Explorer: http://dean.edwards.name/weblog/2005/06/base64-sexy/

0


a source







All Articles