Skip to content

Instantly share code, notes, and snippets.

@jonathanmedd
Created October 4, 2016 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanmedd/884bf120b70820fe0ebf983cc5fd3742 to your computer and use it in GitHub Desktop.
Save jonathanmedd/884bf120b70820fe0ebf983cc5fd3742 to your computer and use it in GitHub Desktop.
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