Image methods
The SharinPix package provides the Apex class, Image, which includes methods that can be applied when manipulating images on Salesforce.
Here is the latest list of methods available (March 2023):
- global static List<Object> moveImages(List<String> lstImageIds, String destinationAlbumId)
- Moves one or more images to another album. Note: This method can be used to move a maximun of 50 images at once. Example:
sharinpix.Image.moveImages(new List<String> { 'imageId1', 'imageId2' }, 'destinationAlbumId');
- Moves one or more images to another album. Note: This method can be used to move a maximun of 50 images at once. Example:
- global void exportAsContentDocument()
- Exports a SharinPix Image to Salesforce as a Content Document. Example:
(new sharinpix.Image('public_id')).exportAsContentDocument();
- Exports a SharinPix Image to Salesforce as a Content Document. Example:
- global static String downloadImages(List<String> imageIds)
- Get a URL that opens a zip including the images.
- Example:
Sharinpix.Utils u = new Sharinpix.Utils();
sharinpix.Image.downloadImages(u.getAlbumImageIds(albumId));
Tip:
The SharinPix package also include the Utils class which provides useful methods that can be used for image, album, tag management and a lot more. For more information about the Utils method, please refer to the article below:
0 Comments
Add your comment