1) When we upload a file into the document object then is the body of the document in binary form or in base64 form?
2) If I uploaded two files in document, First is abc.txt and second is xyz.pdf then does the body of document store both files in same structure?
Please can someone clarify these points for me?
Attribution to: D-Horse
Possible Suggestion/Solution #1
- File upload between a browser and a HTTP server encodes the data using "multipart/form-data" encoding (see e.g. http://www.rfc-editor.org/rfc/rfc1867.txt) and this allows the form fields and the file data being uploaded to be sent in one message. Unlike email protocols, HTTP supports the transmission of binary data, and the content of the file is transmitted in its raw binary form.
- Salesforce may or may not do different things with different types or sizes of uploaded files. The only interface we are provided with is the methods of the
Blob
class so we cannot tell. (The size that the Blob class reports is the size of the original data.) Salesforce do count the space used as "File Storage" rather than "Data Storage" though.
Attribution to: Keith C
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30255