file upload - Size limit on ContentVersion object in Salesforce -


i trying create , insert contentversion object in salesforce lightning(for file upload) using following code:

        contentversion v = new contentversion();         v.versiondata = encodingutil.base64decode(content);         v.title = filename;         v.pathonclient = filename;         insert v; 

this works fine smaller files. when try loading file 750kb above operation fails(actual allowed size still less). there limit on size if files uploaded using above code?

as per similar question salesforce stackexchange.


from base lightning components considerations:

when working type="file", must provide own server-side logic uploading files salesforce. [...] uploading files using component subject regular apex controller limits, 1 mb. accommodate file size increase due base64 encoding, recommend set maximum file size 750 kb. must implement chunking file size larger 1 mb. files uploaded via chunking subject size limit of 4 mb.

the base64 pushing file size past maximum http post form size—the size of keys , values in form limit of 1 mb. or @ least seems applicable limit here.

instead need go either embed visualforce page used in how build lightning file uploader component. gets maximum file size file uploaded using visualforce page limit of 10 mb. remember keep file processing minimum before heap size limit catches you.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -