Create a gist now

Instantly share code, notes, and snippets.

Update Resource Element MIME type
/*
- Update Resource Element MIME type
- Input: resourceElement [ResourceElement]
- Input: mimeType [String]
*/
//Get the existing content
mime = resourceElement.getContentAsMimeAttachment()
//Set the new Mime Type
mime.mimeType = mimeType;
resourceElement.setContentFromMimeAttachment(mime);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment