Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [blob]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
62 views

Blob.valueOf() creates corrupted .zip for application/octet-stream HttpResponse

I am trying to put application/octet-stream HttpResponse body to a .zip file (ContentVersion). I am doing it like this: insert new ContentVersion( Title = title, PathOnClient = title + '.zip',...
Mariia Illarionova's user avatar
0 votes
0 answers
372 views

Is anyone aware if window.URL.createObjectURL is no longer working?

I have an LWC which takes the content of a QR Code in my clipboard and does some magic on it to read the content. In my Sandbox, which is on API V60.0, it seems to be working perfectly fine, but in ...
Tim's user avatar
  • 1,373
0 votes
1 answer
348 views

How can I insert an image blob obtained from the ClipboardAPI as a file attached to a record, via an LWC?

I have been working this problem for a while with no success. I am able to get the image blob from the ClipboardAPI and I am able to create an image file and attach it to the record via an Apex method....
imfromthepast's user avatar
0 votes
1 answer
117 views

What is the efficient way to programmatically fetch binary blob data for automation?

Bulk API 2.0 which is the most efficient way to fetch data in range between 2000 and 15000000, doesn't support binary (blob) data in ContentVersion VersionData and it also doesn't support Attachment ...
Patlatus's user avatar
  • 17k
-1 votes
1 answer
334 views

Create Excel file in Batch Apex Class

I am updating some records in my Batch Apex. I want to add those all records in some excel file and mail it. I am able to do this if i add all those details in a csv file instead of xml file by using ...
tycoon's user avatar
  • 3
1 vote
1 answer
123 views

VF page reference getContent() call returns HTML not PDF blob

I'm having an interesting problem trying to send an email to a Contact with a PDF attachment. I've got a VF page that renders as a PDF, and an page controller apex class that creates the email and ...
Lars's user avatar
  • 11
2 votes
0 answers
58 views

PageReference PDF preview does not display data

I'm trying to create a visualforce popup that displays a preview of a generated PDF (also using visualforce) with tables showing custom object data. The preview window displays the PDF with all the ...
Hyrum Schenk's user avatar
0 votes
1 answer
415 views

Weird "common.apex.runtime.impl.ExecutionException: Syntax error"|0x78b85a0a while doing a Callout

I am basically sending a PDF as a binary file but the request is not going anywhere. The stack trace is following: 23:24:18.100 (138575175)|USER_DEBUG|[28]|DEBUG|50977 23:24:18.100 (138583678)|...
ymiki's user avatar
  • 73
0 votes
0 answers
115 views

Is there a limit on how much the JSON binary response from Get Blob Data API can hold?

Refer to this documentation: Get Blob Data, the response of that API is binary. Document body content is returned in binary form. The response content type isn’t JSON or XML since the returned data ...
Rival's user avatar
  • 601
1 vote
0 answers
300 views

Excel file gets corrupted which uploaded from LWC to Azure blob storage

I am uploading files from salesforce lwc to azure blob storage using SAS token and the code is below i am using <lightning-input type="file" label="Attachment" onchange={...
sfdc_to_learn's user avatar
0 votes
0 answers
38 views

Apostrophe in String to Blob conversion, unexpected Output:<p> I don&#39;t go to school </p>

Input: Content__c = I don't go to school Output: <p>I don&#39;t go to school</p> If I remove apostrophe, input and output are same as expected without p tags. Please refer the below ...
Moumita Saha's user avatar
1 vote
1 answer
928 views

I need to convert a String to Blob within a Flow for the VersionData field on a ContentNote/ContentVersion type

I'm trying to insert a File (ContentVersion) or ContentNote with Rich Text within a Flow. But has anyone encountered the need to convert a string to a blob (base64 encoded type) in order to get a ...
rmarq423's user avatar
  • 967
0 votes
1 answer
295 views

Attachment content is empty

I have a boomi process which takes the file content and send it to salesforce to create attachment. But attachment is blank. Here is my code: String jsonStr = '...
sThirumagal93's user avatar
1 vote
0 answers
148 views

Blank PDF on quote after create from Apex

I have to add funcionality to my class where i can create PDF file on quote. I'm trying to use code like this : public static void createPDF(String quote) { Quote_Setting__mdt quoteSetting = ...
Marko Polo's user avatar
1 vote
0 answers
2k views

Convert base-64 string to Blob in your LWC

Requirement : I need to get Blob Data from my File (represented as ContentDocument) in my LWC. Currently I implemented it in next way : I have an Apex method which returns base-64 string for specific ...
Vitalii Dehnerys's user avatar
3 votes
1 answer
2k views

LWC audio / blob component

I have a LWC component and Apex Method, my apex method return a blob element from API response(my API response is a MP3 audio), how can I use this blob element on JS to add in HTML audio element??
PedroRM's user avatar
  • 55
0 votes
1 answer
439 views

Convert Int Array to Blob

I have an Integer array using it as a ByteArray (It is a publicKey) [-33,103,-48,-46,113 .......] How can I convert it to Blob using Apex?
Holmes285's user avatar
0 votes
0 answers
3k views

Parse blob in apex

We have a @RestResource apex class using which we are receiving the JSON data from application which resides outside of salesforce through REST API. We parse this data to get the jobId from it and ...
Rohan Deoskar's user avatar
1 vote
1 answer
3k views

String to Blob and Blob to String conversion during encryption/decryption

I'm getting the error when I'm trying to decrypt an encrypted value in line 7. Blob exampleIv = Blob.valueOf('Example of IV123'); Blob key = Crypto.generateAesKey(128); Blob data = Blob.valueOf(...
merve-bulut's user avatar
0 votes
0 answers
122 views

Integration batch job + Data Encryption : Need some suggestion

I have written a batch job to push Open Case record every one hr from Salesforce to External system using REST API. I need to Encrypte the data and push it to the external system. Below is the Class ...
Tamil's user avatar
  • 724
1 vote
0 answers
143 views

Unable to save video captured via webcam in Aura Component

I have an Aura component that captures video via webcam and displays it to the user while also giving them the option to save it. The "playback" feature works as expected using the following ...
BarnesCW's user avatar
2 votes
2 answers
3k views

How to get Binary Data to submit to REST API

I'm attempting to use curl and multipart message to attach files to a created record. I am successfully able to do so, however the file is corrupted when I view it. I think I may not be getting the ...
Shuaib Ahmed's user avatar
0 votes
1 answer
2k views

Open a blob file in a new tab of browser in Aura component

I was facing some problems finding a way to open a blob from an Aura (Lightning component) in a new tab of the browser, the window.close() function doesn't work because open with base URL of the ...
Willian Matheus's user avatar
1 vote
0 answers
169 views

Popup warning that blob cannot be opened because of browser settings when generating data with Javascript

When generating a CSV file with Javascript, and trying to make the file available for download locally, using the snippet below: const blobToBase64 = (blob) => { const reader = new FileReader();...
Renato Oliveira's user avatar
0 votes
0 answers
1k views

How to convert blob to byte in Apex

There is a requirement that when I am trying to send images/pdfs files from salesforce to external system, the external system is expecting the content in bytes. I have working code of JAVA but not ...
Jenil's user avatar
  • 43
0 votes
1 answer
5k views

How to open a save as dialog from javascript?

I have a pdf file as a blob in javascript. I want to save the it on my local machine. I am creating an anchor tag, and simulating the click event to download the file. I want to open the "Save as&...
sam's user avatar
  • 1
0 votes
1 answer
511 views

How to remove all unicode characters from a blob?

I have a requirement to parse the contents of a csv blob which has unicode characters. When I am trying to parse it using Blob myBlob = EncodingUtil.base64Decode(response.getBody()) I am getting an ...
Knight of the Vale's user avatar
1 vote
1 answer
851 views

Use CSS in PDF with Apex

I'm trying to generate a PDF file using Apex only (without using VF). I'm having trouble using basic css properties like width and height, I tried to include them in the head, tried inline, but ...
Json's user avatar
  • 1,617
1 vote
1 answer
1k views

How we can read Content Version body and update in Long rich text area field of an object?

I have file attached (Word Document) to the custom object record . I want read the file and get the content between some text and store it in the Custom object record field apex: ContentVersion con =[...
sfdc1100's user avatar
0 votes
0 answers
1k views

Post File to SharePoint from APEX

I am using EinsteinVision_HttpBodyPart approach to create a file in Sharepoint from Salesforce. EinsteinVision_HttpBodyPart And consuming it in my below method, with this approach files are creating ...
user2372248's user avatar
0 votes
1 answer
3k views

ContentVersion to File Attachment in Email | APEX [closed]

I am trying to get the Blob Version Data from the ContentVersion in Apex class and send it in an Email using the Following Code: Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();...
Simple Code's user avatar
1 vote
1 answer
997 views

How can I get content version data without making self callout?

I understand that there are several approaches to get content version data. The default and widely accepted approach is to make self-callout to REST API to get VersionData of VersionData field on ...
Patlatus's user avatar
  • 17k
1 vote
1 answer
890 views

Make HttpRequest Callout to send binary data without corruption

I faced issues when tried to send binary data from Salesforce to external web services. To start with, I tried to send binary data from Salesforce to itself. I am trying to read binary data from valid ...
Patlatus's user avatar
  • 17k
0 votes
1 answer
1k views

Merging Docx files into one - Apex

I have a requirement, which I should merge two or more word files (.docx) together into one file. because I can't do arithmetic operations on Blob - I converted it to hex, made the arithmetic, ...
Salvation's user avatar
  • 1,189
0 votes
1 answer
724 views

Sending PDF file from Salesforce to XERO, but it's not happening

I want to send PDF file which is generated by VF page from Salesforce to XERO. But I'm trying to send but it's not happening XERO syntax, it receives like below format POST /api.xro/2.0/Receipts/...
user89211's user avatar
-3 votes
1 answer
1k views

How to format Excel Column in Apex? [closed]

I'm sending an email via scheduler class with an excel file as an attachment, but the data in the file does not appear to be in proper format. Please check the following image: The code I'm using to ...
user12347's user avatar
0 votes
0 answers
97 views

UnitTest: Cannot take whole Blob value from return value for System.assertequals

I have a class that I want to do unit_test, which returns Blob value above 3000byte. Regarding this, I want to compare it with expected value, using toString method. However, I can't get the whole ...
rosa's user avatar
  • 21
2 votes
2 answers
954 views

How to upload BLOB using the Quip API

Is it possible to upload an audio file using the Quip API? I see in the documentation the API supports the upload of blob objects. I can't seem to get this to work properly. I have tried uploading ...
Jordan Silva's user avatar
0 votes
1 answer
243 views

ContentVersion apex decoding [closed]

we are saving a docx and pdf files in contentversion. But having issue in decoding it back. Blob.tostring doesnt work as the files encoding is not in the UTF-8 formatting. Can you please help me ...
Anu2112's user avatar
2 votes
2 answers
996 views

BLOB is not a valid UTF-8 string for the Contentversion of einstein_platform.pem file

In Einstein Playground app developed by the Salesforce Lab, I have uploaded the einstein platform service private key file named einstein_platform.pem to complete my einstein platform service setup. ...
Md. Abdur Razzak's user avatar
0 votes
2 answers
1k views

Encoding and Decoding BLOB due to error 'BLOB is not a valid UTF-8 string'

I try to encode and decode a BLOB in order to avoid the 'BLOB is not valid UTF-8 string' error, but when I encode the BLOB in UTF-8, decode it again and use the .toString-method, I stil get the error. ...
Andrea Voggenreiter's user avatar
0 votes
1 answer
2k views

Reading data from csv file stored in salesforce files. Content size of 12mb

I have a requirement to upload the csv file of 12mb and read the content in it. Through Lightningfile upload component i am able to load the file in Salesofrce Files and here is the below link for ...
user5558's user avatar
  • 103
2 votes
1 answer
3k views

How to read/parse an X9.37 file via Apex?

Background X9.37 is a standard format used in electronic check exchange (when a depository institution sends an image cash letter file as a deposit to the Federal Reserve Bank, or when the Federal ...
Lightning Evangelist's user avatar
2 votes
3 answers
3k views

Is there any way to convert a PDF blob value to string in Apex / Javascript lightning controller

I am in need of a way to get a PDF to a readable string format so I can search for specific values in the PDF. But from what i've found so far Apex is unable to get the blob value converted into a ...
Alexander Atkinsoon's user avatar
1 vote
0 answers
61 views

CSV attachment, replacing \n from cell values

I am trying to create a csv attachment through apex, I am getting the csv with the values. But some values for eg. 'Hi I am xyz.\n This is an example code.' are getting split to next cell because of ...
wizard's user avatar
  • 423
1 vote
0 answers
205 views

Download Html + Blob image as text

On my VF page, I need to save to SF an html code with a signature represented as a blob (drawn with HTML5 Canvas) as a text file (preferably MS word). Right now, I'm not sure if this should be ...
Json's user avatar
  • 1,617
2 votes
1 answer
413 views

Why Blob equals doesn't work if one of the Blobs is retrieved from ContentDocument?

In brief, I can't test the value stored in a ContentDocument. Even if the value of the two Blobs is the exact same, equals would return false. Do someone know the reason? Here's a unit test to check ...
Francesco Pitzalis's user avatar
1 vote
1 answer
5k views

Convert an apex attachment into a blob?

I am attempting to convert an apex attachment into a blob. My visualforce code is <div class="mt-5 row"> <div class="d-flex justify-content-center col-lg-12"> <...
ccarlson's user avatar
0 votes
1 answer
685 views

Apex Error (Image to PDF conversion) : BLOB is not a valid UTF-8 string

So i have this task where i have to convert the image uploaded in Notes and Attachment object to PDF. For that i created a trigger(before insert) on Attachment object and used the below mentioned code,...
Muhammad Umer's user avatar
0 votes
2 answers
3k views

Combine two different PDFs in single Visualforce page?

I have used below visualforce code to display two pdf in a single page but in the result, I am getting two different PDFs with two sections with iframe. Is it possible to combine these two PDFs in ...
Nail David's user avatar