Questions tagged [base64]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
29 views

UTF8(stringToSign)

Seems like I am not converting the following code from AWS docmentation correctly in Apex ? Signature = base64(hmac-sha256({accessKeySecret}, UTF8({stringToSign}))) My conversion Blob mac = Crypto....
0
votes
1answer
40 views

base64 hash using HMAC SHA256

I am trying to compute the Apex equivalent of the following - var shaBodyContent = CryptoJS.HmacSHA256(stringToSign, postman.getEnvironmentVariable("HMAC_SS")); var b64BodyContent = shaBodyContent....
0
votes
0answers
58 views

Converting base64 to pdf problem

//This is solved. I was converting as pdf but below base64 is in ZIP type. I have changed the code as application/zip and solved! I have a class that takes base64 string and I am converting this ...
2
votes
1answer
511 views

Displaying Images on Visualforce pages using Base64 Blob

My question is about displaying base64 blob as image in visualforce page. Here's my controller code: Object img; public Object getImg () { List<ContentVersion> bodyList = [SELECT ...
0
votes
1answer
411 views

download base64 as PDF seting a name for it

I'm trying to download a PDF file and I wish to give a name to this file and a extension. Here is what I did: Component: <aura:component implements="forceCommunity:availableForAllPageTypes" ...
1
vote
1answer
1k views

System.StringException: Unrecognized base64 character: \

I am trying to parse the response body which is in "base64 content of a file" and trying to create the attachment with the body but getting error of " Unrecognized base64 character: \" I have included ...
1
vote
1answer
43 views

How to call a web service with base85 encoded data?

I need to make a call to a 3rd party SOAP web service from Apex that accepts images encoded in base85 rather than the more standard base64. I don't see that this is supported in Salesforce, any ideas ...
0
votes
1answer
292 views

JWT, Cyrpto.Sign and EncodingUtil.base64Encode

I'm writing my own class to create a JWT. Using the JSONGenerator I am creating the header and payload, base64 encoding these with EncodingUtils. I am then creating a blob from these to sign and use ...
1
vote
1answer
253 views

REST Upload attachments - Json Deserialization failed on token 'null'

I'm using simple-salesforce to migrate attachments from one org to another. I'm encoding with base64 but am getting this error: SalesforceMalformedRequest: Malformed request https://my_org.my....
3
votes
1answer
720 views

Issue while uploading file greater than 5MB

I am trying to upload a file in salesforce and send it to Sharepoint for storage using synchronous call. However, when i upload file more than 5MB i am encountering an issue like below :' {FAILURE=...
1
vote
0answers
65 views

How to capture change in iframe source content?

I am able to show my base64 pdf form data with iframe on Vf page in an editable form so that my user can edit in form and after that, I can store in attachment but I can't able to capture the change ...
0
votes
2answers
317 views

Retrieving VersionData with standard REST API

I am trying to retrieve VersionData with a standard REST API call from a VisualForce Page a then upload it to a S3 bucket but end up with corrupted files. I believe this is an encoding problem on the ...
1
vote
1answer
345 views

Attachment uploaded using base64 encode is throwing an error

I am trying to upload a pdf file from anonymous block using the following code public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType) { base64Data = ...
2
votes
0answers
51 views

Rest API downloading Idea AttachmentBody

When downloading Idea's AttachmentBody field per the documentation, the download gets a 400. Example: services/data/v37.0/sobjects/Idea/087c00000009GDVAA2/AttachmentBody services/data/v37.0/...
1
vote
1answer
307 views

Insert base64 string as attachment using apex dataloader

I have a .csv file which has a column containing base64 string equivalent of a image. Anyway we can load the csv file into Attachments object or ContentVersion object using apex dataloader? I know if ...
0
votes
3answers
796 views

CSV decode in Apex

I am trying to read the CSV values in apex. I am getting the base64 file in apex, however not able to read the data. Helper method: uploadHelper: function(component, event) { var fileInput =...
0
votes
1answer
165 views

Metadata API file based retrieve and deploy calls

I want to build an java application where my code take package.xml and retrieve all metadata. Well this one is done using Java Example code given by Salesforce. Now I need to unzip that zip and do ...
4
votes
0answers
552 views

Charset for Platform Event not UTF-8?

When trying to publish a platform event from our middleware solution (Boomi) to our salesforce instance, I'm receiving a 400/Bad request (this was intermittent, as some would process without issue). ...
3
votes
1answer
3k views

base64encode/decode issues with Blob.toString() method

Why would this work in anonymous apex: String a = '[{\"salesOrder\":{\"externalId\":\"\",\"ebsHeaderId\":\"12345\",\"ebsOrderNumber\":\"12345\",\"orderNumber\":\"12345\",'; String encode = ...
0
votes
0answers
500 views

REST API: Insert or Update Blob Data

Looking to the community for some help on this one.. I've been using postman to deliver a multipart message with the binary data to upload a document to a document folder through the REST API. The ...
1
vote
2answers
1k views

Inserting attachment in REST API

I have a rest API that takes many different parameters. One will be a list of possible different attachments (images, pdf, etc.). They will come base64 encoded already. With that being said, what's ...
0
votes
1answer
86 views

How to create a Chatter File from a big base64 string to image png

I have a problem with chatter files, I have a webcam theese webcam take a snap and I need upload this snap to chatter entry in a Chatter of custom object. After of take a picture with the webcam I ...
0
votes
1answer
44 views

HttpRequest Converting > to?

I am using code (see below) that I found for sending an AWS SES message with an HttpRequest to amazon. I am able to send MIME messages with PDF attachments and all has been great. Today, I tried ...
0
votes
2answers
6k views

Save base64 data as Attachment

This has been bugging me for a while. I think I am missing something very obvious. So from a REST api I am getting a base64 data of a PDF. I am trying to save the PDF as Attachment under an object. I ...
1
vote
1answer
417 views

Retrieving a standard base64 field from Lightning Component causes internal server error

In a component, I'm returning a list of ContentNote from the server and displaying the records' data in an aura:iteration. Including ContentNote.Content (a base64-type field) in the return from the ...
1
vote
1answer
591 views

Displaying user's profile picture dynamically in email template

I have a requirement to display user's profile picture dynamically in the email template. Email template: <messaging:emailTemplate subject="Test" recipientType="Contact" relatedToType="Account"&...
5
votes
7answers
8k views

uploading files in contentVersion using lightning component

I am developing a lightning component to upload files in the contentVersion object. I used this site as a reference: http://peterknolle.com/file-upload-lightning-component/ I was able to ...
1
vote
2answers
412 views

Is Document Body Blob field value encoded in Base64 when extracted by Dataloader? Can this encoding be used for insert or update?

I want to use Salesforce DataLoader to extract and upload Documents. However, I don't understand in which format Blob Body values are stored, is it Base64 encoded? Looks like yes, but why it is not ...
2
votes
0answers
950 views

Base 64 Content in PDF

We are receiving a base64encoded string from apex webservices and we have to display that as pdf whenever user clicks on a button. currently we have the below code var isIE = false || !!document....
6
votes
2answers
924 views

Integer Array to Base64 String

So I am struggling a bit to convert some code written in java to APEX. The struggle here is that I have an integer array as one of my encryption key, it looks something similar to this below: [242, 2,...
8
votes
1answer
524 views

How to store (or ignore) Base64 images in emails processed by email-to-case?

We're getting the following error when receiving an email containing a Base64 encoded image directly in the html: Invalid data specified, the provided data does not seem to be a valid image: [B@...
1
vote
0answers
142 views

Apex - One extra character in string variable problem

I have recently stumbled upon a rather interesting problem on my end. I have set up an integration with external system, and it responds me with a Base64 encoded Hex code of a PDF document whenever I ...
1
vote
3answers
2k views

Unrecognized base64 character: {

I need to have a JSON Formatted Base64 for this, but I am not sure how to change this string to have it as Base64 JSON Format. public String requestBody = '{["Um05dkxFSmhjZz09"]}'; ...
-1
votes
1answer
102 views

Inserting a PDF Record as attachment Maximum view state size limit (135KB) exceeded [duplicate]

I thought maybe I can do a work around of this issue "Maximum view state size limit (135KB) exceeded" by having the user insert all the document into salesforce first then select the documents that ...
1
vote
1answer
3k views

Converting Attached PDF into base64

Currently I am letting user to upload multiple PDF Files. Now I have created a service outside of salesforce that will merge multiple PDF into one. I need to convert those PDF Files into base64 in ...
0
votes
1answer
970 views

Base64 Encode email address in url parameter within a link in the email

I am trying to base64 encode a subscriber's email address within a link in an email. I am using Exact Target and trying to encode the personalization string %%emailaddr%%. this is what I have so ...
0
votes
1answer
433 views

AMPScript / JS Base64Encode for images create wrong code

I'm trying to create a dynamic QR code to be sent in a triggered mail, but since QR codes are not supported (only bar codes are) am I using Google API to create one. I then try to base64 encode the ...
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 ...
2
votes
1answer
1k views

Generate another ID by encoding the Salesforce ID

I am trying to generate another ID in Salesforce using a after insert, after update trigger. I wish to use this unique identifier as a URL parameter so it has to contain characters that are url ...
4
votes
2answers
5k views

Salesforce isn't handling Base64 Encoded attachments uploaded via Rest API

I'm uploading an image as an attachment to an object in Salesforce via Rest API v32. My HTTP request body looks like so: --boundary_string_1416597802788 Content-Disposition: form-data; name="...
2
votes
1answer
777 views

convert Base 64-encoded binary data to image

I am having the Base 64-encoded binary data suppose for 50 image and i want to render that as image on visualforce page using repeat. I used <apex:repeat value="{!objectName}" var="img" id=...
1
vote
2answers
800 views

Separate base64 images received in HttpResponse

I am receiving a bunch of images together in base64 format in a HttpResponse. I am querying my java heroku app which returns a response something like this: [imgData]{base64image}[/imgData]/n [...