5
votes
Accepted
What is the difference between Blob.valueOf and EncodeUtil.base64Decode?
tl;dr: Blob.valueOf doesn't encode or decode the string, but uses it as is, while EncodingUtil.base64Encode and EncodingUtil.base64Decode convert to/from a 7-bit safe encoding format for use in ...
3
votes
Accepted
How can I insert an image blob obtained from the ClipboardAPI as a file attached to a record, via an LWC?
To fix your issue with attaching images in Salesforce using LWC, you'll need to tweak how the image data is handled. Start by converting the image (which you got from the ClipboardAPI) into a base64 ...
2
votes
Accepted
Blob.valueOf() creates corrupted .zip for application/octet-stream HttpResponse
I found a solution, not deleting question, because it may be helpful for others:
Use res.getBodyAsBlob() instead of Blob.valueOf(res.getBody()).
2
votes
Accepted
Create Excel file in Batch Apex Class
Technically yes, but practically no.
Excel files are relatively complex beasts following the Office Open XML SpreadsheetML format that are put into a Zip archive.
Salesforce doesn't provide any class/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
blob × 127apex × 69
attachment × 21
contentversion × 15
pdf × 13
visualforce × 11
javascript × 10
rest-api × 9
callout × 9
httprequest × 9
base64 × 8
blob.topdf × 7
lightning-web-components × 5
unit-test × 5
string × 5
pagereference × 5
csv × 5
document × 5
json × 4
class × 4
files × 4
crypto × 4
encodingutil × 4
lightning-aura-components × 3
trigger × 3