Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let options = {
- uri: '/asset/v1/content/assets',
- json: true,
- body: MCData
- }
- const RestClient = new FuelRest({auth: FuelAuthClient});
- RestClient.post(options)
- .then((result) => {
- console.dir(result);
- })
- .catch((error) => {
- console.dir(error);
- })
- {
- "name":"Document 123",
- "assetType":{
- "name":"png",
- "id":28
- },
- "file":"data:image/png;base64, REST OF THE Encoded IMAGE HERE"
- }
- { message: 'Internal Server Error',
- errorcode: 0,
- documentation: 'https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm' }
Add Comment
Please, Sign In to add comment