You need to sign in to do that
Don't have an account?
Sam Swann
File Upload to a Standard Object in a Lightning Component
Hi
I am very new to Lightning Development. I am trying to learning developing Lightning components on my own.
I was trying to develop an Input form for Case Object. Now, I wanted to Attach files feature as well to the form at the very bottom.
Once I upload and save the form, a new Case record should be created with attachments in the record detail page.
I have used this to get the Input for upload a file:
<lightning:input type="file" label="Attachment" name="file" multiple="true" aura:id = "upButton" accept="image/png, .zip" onchange="{! c.handleFilesChange }"/>
Can someone share a simple code for the controller(handleFilesChange) as well as the Server-side class to save the data to Case object.
Thanks!
Refer below links.
https://gist.github.com/peterknolle/bb4b7ac63f67f66c32b0
https://developer.salesforce.com/blogs/developer-relations/2015/11/create-lightning-component-drag-drop-profile-pictures.html
http://peterknolle.com/file-upload-lightning-component/
Hope this helps :)
Thanks!
Amit
You can consider using lightning:fileUpload component. You can upload files up to 2GB and attach it to the record at same time.
Please refer to https://developer.salesforce.com/docs/atlas.en-us.210.0.lightning.meta/lightning/aura_compref_lightning_fileUpload.htm for more details.
Thanks,
Manish Jha
http://www.sfdcmonkey.com/2017/09/25/file-upload-lightning-component/
Thanks
Iam new for Aura components. I created a form on Aura Component using fileupload....
How to store the uploaded file into custom object record?