handwritten-signature and base64

11 views
Skip to first unread message

Jarosław Kowalewski

unread,
Jun 22, 2020, 4:59:39 PM6/22/20
to orb...@googlegroups.com
Hi,
I'm trying to change type of the control from anyURI to base64Binary and it almost works. Almost because below there is no correct base64 format. 
image.png

I the result FR reports error. 

image.png

Is it any way to fix it somehow? 
Tested also in 2018.2.4 PE

//Jarek

Alessandro Vernet

unread,
Jun 23, 2020, 1:03:09 AM6/23/20
to orb...@googlegroups.com
Hi Jarek,

What do you mean by "change type of the control from anyURI to
base64Binary"? What are you doing exactly? And why, i.e. what are you trying
to achieve?

‑Alex

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

Jarosław Kowalewski

unread,
Jun 23, 2020, 4:31:42 AM6/23/20
to orb...@googlegroups.com
Hi Alex,
I changed type in the bind from type="xf:anyURI" to "xs:base64Binary" as in the example url.
My goal is to have a signature encoded in base64 in the model instead of using URI to the saved content. Exactly the same as we have in the attachments.

//Jarek

--
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 orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1592888587545-0.post%40n4.nabble.com.

Alessandro Vernet

unread,
Jul 2, 2020, 12:07:34 AM7/2/20
to orb...@googlegroups.com
Hi Jarek,

The data is stored with the data URL (see link below). As you noted, that
URL has base64 prefixed by `data:image/png;base64,`, but isn't
`xs:base64Binary`. And this is why in the form definition, Form Builder puts
`<xf:bind type="xf:anyURI"/>`. This is correct, as a data URL is an
`xf:anyURI`.

Now you're saying that you would prefer the signature to be stored in
straight base64, so the form definition could have the type
`xs:base64Binary`? If so, is it maybe because you have a use case where it
is more convenient to have straight base64 than a data URL that contains
base64?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

Alessandro Vernet

unread,
Jul 8, 2020, 12:56:16 PM7/8/20
to orb...@googlegroups.com
Hi Jarek,

Have you found a way to do what you were aiming for with regard to the
signature component and how the signature itself is stored in the form data?

Jarosław Kowalewski

unread,
Jul 8, 2020, 4:11:36 PM7/8/20
to orb...@googlegroups.com
Hi Alex,
yes, all is clear. I must have had some sort of a blackout.
I thought that to have base64 I need to change the type from xf:anyURI to xs:base64Binary. 

//Jarek

--
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 orbeon+un...@googlegroups.com.

Alessandro Vernet

unread,
Jul 9, 2020, 12:58:55 AM7/9/20
to orb...@googlegroups.com
Hi Jarek,

Got it, perfect then! (And I have to admit that I had at first been confused
my self, and thought that using `xf:anyURI` for the signature was a bug… but
it isn't.)

-Alex
Reply all
Reply to author
Forward
0 new messages