Skip to content

Instantly share code, notes, and snippets.

@timrobertson100
Created March 30, 2017 18:59
Show Gist options
  • Save timrobertson100/c600784a5d05289a4ecf3e53ff565af3 to your computer and use it in GitHub Desktop.
Save timrobertson100/c600784a5d05289a4ecf3e53ff565af3 to your computer and use it in GitHub Desktop.
Asset
let asset = await space.createAsset({
fields: {
title: {'en-GB': "test"},
description: {'en-GB': "test"},
file: {
'en-GB': {
contentType: "image/png",
fileName: "logo-1.png",
upload: "https://api.gbif.org/v1/image/unsafe/cms.gbif-uat.org/sites/default/files/gbif_event/images/logo-1.png"
}
}
}
});
let processed = await asset.processForAllLocales();
await processed.publish();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment