Delete an asset by ID. This will also delete the actual asset file/image.
Asset document ID to delete
Promise resolving when asset is deleted
Uploads a file asset to the configured dataset
Asset type (file)
Asset content - can be a browser File instance, a Blob, a Node.js Buffer instance or a Node.js ReadableStream.
Optional
options: UploadClientConfigOptions to use for the upload
Uploads an image asset to the configured dataset
Asset type (image)
Asset content - can be a browser File instance, a Blob, a Node.js Buffer instance or a Node.js ReadableStream.
Optional
options: UploadClientConfigOptions to use for the upload
Uploads a file or an image asset to the configured dataset
Asset type (file/image)
Asset content - can be a browser File instance, a Blob, a Node.js Buffer instance or a Node.js ReadableStream.
Optional
options: UploadClientConfigOptions to use for the upload
Client for managing assets (files and images) in Sanity. Provides methods for uploading, deleting and managing assets.
Example