Questions tagged [blob]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
16
votes
3answers
23k views

Post multipart without Base64 Encoding the body

I am trying to POST a PDF attachment to a Restful web service (not under my control). My issue is that I need to get put the raw bytes of the PDF into the Body of the request and whenever I call Blob....
3
votes
4answers
15k views

Send Blob file via Apex Rest Callout

I'm trying to send a Blob Apex REST callout and it is keep failing. I tried all the examples in the web but didn't work. What is the standard and correct way to send Blob data via REST callouts? //...
9
votes
2answers
8k views

How to combine multiple Blob in apex to get single Blob value

Is there a way in Apex to combine multiple Blob values and get a single Blob value? Blob b1 = Blob.valueOf('s1'); Blob b2 = Blob.valueOf('s2'); Blob b3 = Blob.valueOf('s3'); Blob combined = b1 + b2 + ...
10
votes
1answer
8k views

Why is String.valueOf(Blob) different that Blob.toString()?

I am working on a REST Service that will desiralize the request body and interpret it. My understanding was that calling String.valueOf(objectInstance) would just call objectInstance.toString(). ...
4
votes
1answer
4k views

Combine multiple PDF's together and attach them in a mail?

As of now , all i have is a VF page which renders as a PDF and it needs Account ID to be passed to generate a PDF . Is there a way wherein i can group all the PDF's into a single PDF ? Should i change ...
3
votes
1answer
734 views

Display PDF with Visualforce using Lightning Experience

Is this post still valid as a solution to download a pdf from third-party site, then displaying it in a Visualforce page? This is what I'm doing in my code: Visualforce page <apex:page ...
2
votes
1answer
4k views

Apex Blob data chunking

I am able to upload the Blob data to the local web server. However, the I have run into the error "Exceeded max size limit of 12000000 with request size xxxxx" This means that the file size is ...
11
votes
2answers
2k views

Save attachment with Remote Objects

is it even possible to save attachment with remote objects to salesforce? I tried this: construct remote object model <apex:remoteObjects jsNamespace="MyModel"> <apex:remoteObjectModel ...
3
votes
1answer
4k views

Multipart form data post file with multiple form parameters?

I am gone through this post and wanted to add one more form data parameter, but when I am sending a request that parameter it not getting posted into form data, please advise what I am missing. Here ...
4
votes
1answer
3k views

Reading a pdf file in apex controller

I am trying to read a pdf file that is stored in Static resources.The body of the pdf comes in a Blob format, but I am not able to get the blob back to the readable format.How do I accomplish it.
10
votes
2answers
3k views

Sending a blob from Salesforce in a HTTP request?

Documentation says we can't do this. So as the title says, is there a workaround to make this possible?
3
votes
2answers
3k views

File Attachment not working when attaching crm Content

I have a page where the user selects content (that is 5MB or lower, only 2 attachments allowed per email) to use as an attachment in an email. It all seems to work fine, the email sends and there are ...
0
votes
1answer
174 views

List out of bound exception at List<Blob>

I have below piece of code where I get below error. Here b is the List of blobs. Error List index out of bounds: 3 Apex Code for(integer i = 0; i <counter; i++) { Messaging....