Upload

Upload

Source:
Upload instances

Type Definitions

Upload

Source:
Properties:
Name Type Description
sys Object Standard system metadata with additional asset specific properties
Properties
Name Type Description
id string The id of the upload
delete function Deletes an upload
toPlainObject function Returns this Asset as a plain JS object
Type:

Methods

(static) delete() → {Promise}

Source:
Deletes this object on the server.
Example
const contentful = require('contentful-management')

const client = contentful.createClient({
  accessToken: '<content_management_api_key>'
})

client.getSpace('<space_id>')
.then((space) => space.getUpload('<upload_id>'))
.then((upload) => upload.delete())
.then((upload) => console.log(`upload ${upload.sys.id} updated.`))
.catch(console.error)
Returns:
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Type
Promise