interface Upload {
    sys: MetaSysProps & {
        environment?: SysLink;
        space: SysLink;
    };
    delete(): Promise<void>;
    toPlainObject(): UploadProps;
}

Hierarchy (view full)

Properties

Methods

Properties

sys: MetaSysProps & {
    environment?: SysLink;
    space: SysLink;
}

System metadata

Methods

  • Deletes this object on the server.

    Returns Promise<void>

    Promise for the deletion. It contains no data, but the Promise error case should be handled.

    const contentful = require('contentful-management')

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

    client.getSpace('<space_id>')
    .then((space) => space.getEnvironment('<environment_id>'))
    .then((environment) => environment.getUpload('<upload_id>'))
    .then((upload) => upload.delete())
    .then((upload) => console.log(`upload ${upload.sys.id} updated.`))
    .catch(console.error)