Newer Version Available
StaticResource
Supported Calls
create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), update(), upsert()
Fields
Usage
Use static resources to upload content that you can reference in Visualforce markup, including archives (such
as .zip and .jar files), images, stylesheets, JavaScript, and other files. Using a static
resource is preferable to uploading a file to the Documents tab because:
- You can package a collection of related files into a directory hierarchy and upload that hierarchy as a .zip or .jar archive.
- You can reference a static resource in page markup by name using the $Resource global variable instead of hard-coding document IDs.
Encoded Data
The API sends and receives the binary file data encoded as a base64 data type. Prior to creating a record, clients must encode the binary file data as base64. Upon receiving an API response, clients must decode the base64 data to binary (this conversion is usually handled for you by the SOAP client).