cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to store base64 string as binary?

uskalviskis
Participant
0 Likes
4,465

Hi all cloud developers,

currently I'm facing issue to which I can't find solution. I get through web service call binary content as base64 string. I want to store it as attachment in cloud. But currently seems like there is no possibility to do that.

First I thought that Binary.ParseFromString() function could solve this issue but now I understood that it's used differently.

Does anybody of you faced this issue and found solution?

Thanks,
Uldis

View Entire Topic
uskalviskis
Participant
0 Likes

Problem at least temporally is solved. As I thought ParseFromString is not that function on which we can relay when we need to decode base64 string to binary. So there was made code fix from backed for now adding function which actually decodes base64 string to binary.

So I really hope that in future Binary library could be updated with new fuction which decodes base64 string back to binary.

Best regards,
Uldis

Former Member
0 Likes

Hello Uldis,

I have a similar problem.

I want to pass the binary-content to Adobe Livecycle Designer for printing an image dynamically.

That will work if I get the binary data somehow in the XML. Because the AttachmentFolder is not filled in the XML I want to make a customer field an move the binary into it.

I need the binary representation as a hexadecimal string like I see it in the debugger. A base64-coded string will work also. But at the moment I'm not able to do anything with binaryObject.content.

Is there any way to move it to an LANGUAGEINDEPENDENT_EXTENDED_Text field in my xbo?

If I fill my field manually from the UI everything works fine, but I need the binary content to fill it automatically. Any ideas?

kind regards,

Frank

Former Member
0 Likes

As there is no way that you can use a BinaryObject in an xbo, the question you asked is valid.

So, lemme ask if you tried the below thing already? make sure that your binary content will be no more than 255 characters else it will be trimmed out. Please let us know your progress here when you try.

Former Member
0 Likes

Today I switched to 1402 and tried ToBase64String. It does exactly what I need. In my opinion I have no restriction to 255 characters. I use LANGUAGEINDEPENDENT_EXTENDED_Text in my xbo and specially for xbo this type is unlimitted in length.

By the way, the test shell in Studio 1402 is not able to show the content of my LANGUAGEINDEPENDENT_EXTENDED_Text-Field, it's always empty.

But I get the base64 data in my xml and the form is printing the image.

Thank's a lot for your hint. 🙂

kind regards,

Frank