Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are attachments uploaded with Messages getting corrupted?

0
Posted

Why are attachments uploaded with Messages getting corrupted?

0

WebWorks_WriteArrow(WebWorksRootPath, “wwdd1028228”, true); WebWorks_WriteDIVOpen(“wwdd1028228”, true); This may be due to incorrectly encoding a file before sending it. The schema has a data type of xsd:base64Binary which is mapped to a byte array in .NET and Axis (java). On the client side we only need to pass a text or binary file as a byte array with no further base64 encoding. Therefore, do NOT Base64 Encode the file before sending it to Axis or .NET as these layers will do so themselves. Sample Code: Correct ——– fis = new FileInputStream(inFile); b = new byte[(int)inFile.length()]; fis.read(b); myMediaItem.setContent(b); ——– Incorrect ——— fis = new FileInputStream(inFile); b = new byte[(int)inFile.length()]; fis.read(b); myMediaItem.setContent(new String(Base64.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123