function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Krishna12Krishna12 

How to upload a file from viualforce

how to upload a file frm vf and how it connect to apex and how it is stored in datamadel...

sfdcfoxsfdcfox

1) In visualforce, use <apex:inputFile> to generate an upload dialog. Check the Component Reference or the Visualforce Developer's Guide for details.

 

2) This element has several attributes that connects its data from Visualforce into Apex Code, including the file name, content type, and the contents of the file.

 

3) You store them wherever is most appropriate for your use case. They might be Attachment records (to a specific parent record), Document records (stored in the documents tab), Content, or other areas that support "blob" types.