+ 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"]]]];