Created
February 28, 2020 19:19
-
-
Save zuzannamj/5444c98baf71f9ef0118ab0cc71cba0e to your computer and use it in GitHub Desktop.
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
var headerNames = ["Authorization"]; | |
var headerValues = ["Bearer " + accessToken]; | |
var jsonBody = { | |
"name": fileName, | |
"assetType": { | |
"name": assetName, | |
"id": assetTypeID | |
}, | |
"file": base64enc | |
}; | |
var requestUrl = rest_instance_url + "asset/v1/content/assets" | |
var createAsset = HTTP.Post(requestUrl, contentType, Stringify(jsonBody), headerNames, headerValues); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment