Uploading PDF to Azure Blob Storage via Groovy - Issues with pictures

Julian Baldner 1 Reputation point
2022-03-28T11:32:45.927+00:00

0

I have the request to Upload a PDF from SFTP to Azure Blob which is working for text based PDF only.

If I have a PDF with pictures the PDF ulploaded is faulty (missing pictures)

If I use the "normal" bytearrayoutputsream and return a string I convert it back to PDF and it works.

The issue only occours using Azure methods:

I use this line of code to so:

def body = message.getBody(String.class) BlobOutputStream blobOutputStream = blob.openOutputStream() blobOutputStream.write(body.getBytes()) blobOutputStream.close()

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,919 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.