Retrieve file attachment

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Retrieve file attachment

kushp
I've used the file attachment control in an Orbeon form. After retrieving the form data, the attachment control has the following  value:

<control-17 filename="1.png" mediatype="image/png" size="187618"> /fr/service/persistence/crud/S2S_Forms/NSF_CoverPage_1_7V1_7/data/31a3fb75d99f8da6e56e1d9fa48072875ba1a0e1/a267e6f8b2c71bf515c13225eb4871b17532f9fc.bin
</control-17>

I'm aware that this is the path to file. I successfully received the a267e6f8b2c71bf515c13225eb4871b17532f9fc.bin file. This is in binary format. On renaming the file to a267e6f8b2c71bf515c13225eb4871b17532f9fc.png, I retrieved my uploaded image. Simple as that.

But is this the correct way to do so?

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Retrieve file attachment

Alessandro  Vernet
Administrator
Hi Kush,

Yes, this is correct. And you've most likely already seen this, but just in
case, the original file name and mediatype for the file as reported by the
browser are available as attributes in the XML document. In your case:

filename="1.png"
mediatype="image/png"

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet