Questions tagged [blob]
128 questions
-1
votes
0
answers
33
views
Loading external script from azure blob
I am trying to load an external script which will load our application which is a bot.
For loading this I am using blob stored link which is https://blob-storage-url/javaScriptfile.ja.gz. This file I ...
0
votes
0
answers
30
views
Add Blob to Spreadsheet Cell via Quip Automation API as an Image
I am trying to use the automation api to create a blob of an image file and then add the image to a cell within a spreadsheet.
The documentation specifies that AddBlobToThread API Returns a url that ...
0
votes
1
answer
415
views
Salesforce Apex - POST multipart/form-data Content-Type + TEXT
This is the second case that I open regarding this topic to ask more specific questions (the first Using blob variables in apex code)
In the first one they already indicated to me a first solution ...
1
vote
1
answer
309
views
What is the difference between Blob.valueOf and EncodeUtil.base64Decode?
I've a scenario where i'm saving the file as content version is attching to a record when i use blob.valueOf() it's failing and when i use EncodingUtil.base64Decode() the method is creating record . I ...
1
vote
0
answers
83
views
Visualforce Blobs variables in apex code
I'm here to tell you about a problem I'm having and what I think should work is not working for me.
The main problem is that I am integrating Salesforce with a new document manager. The administrators ...
2
votes
1
answer
109
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',...
0
votes
0
answers
709
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 ...
0
votes
1
answer
1k
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....
0
votes
1
answer
297
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 ...
-1
votes
1
answer
673
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 ...
1
vote
1
answer
183
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 ...
2
votes
0
answers
79
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 ...
0
votes
1
answer
700
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)|...
2
votes
0
answers
380
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={...
1
vote
1
answer
1k
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 ...
0
votes
1
answer
397
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 = '...
1
vote
0
answers
173
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 = ...
1
vote
0
answers
3k
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 ...
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??
0
votes
1
answer
561
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?
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 ...
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(...
0
votes
0
answers
156
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 ...
1
vote
0
answers
156
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 ...
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 ...
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 ...
1
vote
0
answers
186
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();...
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 ...
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&...
0
votes
1
answer
606
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 ...
1
vote
1
answer
1k
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 ...
1
vote
1
answer
2k
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 =[...
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 ...
0
votes
1
answer
4k
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();...
1
vote
1
answer
1k
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 ...
1
vote
1
answer
1k
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 ...
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, ...
0
votes
1
answer
756
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/...
-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 ...
0
votes
0
answers
99
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 ...
2
votes
2
answers
1k
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 ...
0
votes
1
answer
265
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 ...
2
votes
2
answers
1k
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. ...
0
votes
2
answers
2k
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. ...
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 ...
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 ...
2
votes
3
answers
4k
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 ...
1
vote
0
answers
67
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 ...
1
vote
0
answers
217
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 ...
2
votes
1
answer
437
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 ...