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
ngattungattu 

Download and store an image in Salesforce org

Hi,

 

At present I am able to download an image to the local disk. But I need to download an image and store it  as a document in Salesforce Org so that it can be attached to the email.

 

Could anyone please help me on how to download and store an image as a document in Salesforce Org.

 

Thanks in advance.

 

 

 

TheSwamiTheSwami

You can store images and other static files as Static Resources.  This document explains how to upload the files and reference them from Visualforce:

http://www.salesforce.com/us/developer/docs/pages/Content/pages_resources.htm

 

 

Alex AppaduraiAlex Appadurai
UIImage* img =[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[(ZKSObject*)[records objectAtIndex:indexPath.row]        fieldValue:@"FullPhotoUrl"]]]];