Upload control for PDF attachments

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

Upload control for PDF attachments

kushp
I have got a File attachment control in my form. I want to control the behavior of uploaded file. It should only be a PDF file, i.e of type "applicaton/pdf" type. I've gone through https://doc.orbeon.com/xforms/controls/upload.html#validating-a-file-upload, but this will not restrict the uploading of another type of file. However, it'll show it as a validation error.

Following is the section for 'The accept attributes'. I tried to edit the source of an Orbeon form to put this:

<xf:upload ref="control-18" accept="application/pdf">

But I'm not sure where to put this line in the source. At what location should I put this line?

--
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: Upload control for PDF attachments

kushp
I'm attaching the source for the Orbeon form.

On Monday, April 30, 2018 at 7:38:00 PM UTC+5:30, [hidden email] wrote:
I have got a File attachment control in my form. I want to control the behavior of uploaded file. It should only be a PDF file, i.e of type "applicaton/pdf" type. I've gone through <a href="https://doc.orbeon.com/xforms/controls/upload.html#validating-a-file-upload" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fcontrols%2Fupload.html%23validating-a-file-upload\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHNDPuhY0rJfn2h5WL4Xa7AfVaUZg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fcontrols%2Fupload.html%23validating-a-file-upload\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHNDPuhY0rJfn2h5WL4Xa7AfVaUZg&#39;;return true;">https://doc.orbeon.com/xforms/controls/upload.html#validating-a-file-upload, but this will not restrict the uploading of another type of file. However, it'll show it as a validation error.

Following is the section for 'The accept attributes'. I tried to edit the source of an Orbeon form to put this:

<xf:upload ref="control-18" accept="application/pdf">

But I'm not sure where to put this line in the source. At what location should I put this line?

--
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].

form.xml (36K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upload control for PDF attachments

Alessandro  Vernet
Administrator
Hi Kush,

You can do this directly in Form Builder:

<http://discuss.orbeon.com/file/t119778/Supported_file_types.png>

You'll let me know if this works for you.

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
Reply | Threaded
Open this post in threaded view
|

Re: Upload control for PDF attachments

Alessandro  Vernet
Administrator
Hi Kush, were you able to use the Supported File Types in the Control
Settings to limit the files users can upload to PDFs? -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
Reply | Threaded
Open this post in threaded view
|

Re: Upload control for PDF attachments

kushp
Yes, I was able to do it. Thank you Alex!

On Thursday, May 10, 2018 at 2:52:42 AM UTC+5:30, Alessandro Vernet wrote:
Hi Kush, were you able to use the Supported File Types in the Control
Settings to limit the files users can upload to PDFs? -Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: <a href="http://discuss.orbeon.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;">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].
Reply | Threaded
Open this post in threaded view
|

Re: Upload control for PDF attachments

Alessandro  Vernet
Administrator
Perfect Kush, and thank you for the update. -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