Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Example {
- /*
- * Define the name of the folder containing your images as a constant
- */
- public static final String IMAGE_FOLDER = 'Downloadable Images';
- /*
- * Example for retrieving all PNG files within the images folder
- *
- * @return A list of retrived documents
- */
- public static List<Document> retrieveImages() {
- return [
- SELECT Id, Name, Type
- FROM Document
- WHERE Folder.Name = :IMAGE_FOLDER
- AND Type = 'png'
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement