简体   繁体   中英

Orbeon - how to validate file content uploaded by user

I need to validate content of pdf file sent by "File Attachement" component, using Webservice, uploaded by user.

How to do that ?

Action Value Change is not called

ver.orbeon-4.4.0.201311042036-PE Thanks Piotr

That probably requires a few steps:

  1. Determine when the upload is complete. With recent versions of Orbeon Forms, the event xxforms-upload-done can be used.

  2. Send the content of the uploaded file to a service. The file can be a binary file, but there is a way to submit binary content .

  3. Depending on what the service returns, mark the control valid or invalid. You could do this with an attribute on the element holding the uploaded file's URL, eg: <my-upload valid="true"/> and then use a constraint like constraint="@valid = 'true'" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM