All Questions
Tagged with contentversion blob
15 questions
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 ...
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',...
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
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 ...
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 ...
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
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 ...
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
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. ...
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 ...
0
votes
1
answer
984
views
How to Upload ContentVersion into OneDrive using Apex?
I am unable to send a png file from Salesforce ContentVersion to Microsoft OneDrive. Below is my code:
for (ContentVersion cv : ListFilesToBeUploaded)
{
Http http = new Http();
httpRequest ...
4
votes
1
answer
775
views
Body not a variable of ContentVersion?
I am drafting up a couple of unit tests for this code.
Here is what the code looks like so far:
public class ContentController {
public ContentController() {
file = new ContentVersion(...
3
votes
2
answers
4k
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 ...