Created
October 4, 2016 15:40
-
-
Save jonathanmedd/884bf120b70820fe0ebf983cc5fd3742 to your computer and use it in GitHub Desktop.
Update Resource Element MIME type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
- 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