+ Start a Discussion

BestPractices to upload file from local machine to salesforce.com.

How to upload file from local machine to salesforce.com.

Can you give some idea  or sample on how to implement it...!!


It will be great if anyone could help on this..


Thanks in advance.


You have a couple of choices:

Import Wizards:
Easy to use tool to load Accounts, Contacts, Leads, Solutions, or Custom Objects.
Load 50,000 records or less.
Will prevent duplicates: Account Name and Site; Account IDs
  Contact Email Address; Contact Name; Contact ID
  Lead Email Address; Lead IDs


The Apex Data Loader:
Is a fully supported salesforce.com product.
Supports import from CSV or export to CSV.
Supports loading from or exporting to a database via JDBC.
Supports custom relationships for upsert.
Can be run from command line.
Load any object supported by the API.
Load more than 50,000 records.
Schedule regular data loads such as nightly feeds.
Export data for backup.
Mass delete supported objects.


Hi John,
I have Custom Object say Employee and I need to upload each employee picture using "apex:inputFile" while  saving each employee record.

  <apex:inputFile id="inputFile" value="{!document.Body}" filename="{!document.Name}"/>
I think we need to use Standard Object "Document" aswell our Custom Object "Employee", How to relate these two objects in Pages & controller.
Can you please send me sample for this.


Sounds like you will need to write a custom APEX controller. Do you have experience with that? If not, try reading through some of the samples in the Cookbook: http://wiki.developerforce.com/index.php/Force_Platform_Cookbook
Is this the solution u give? ...thank u