Installation
Initialize Restash
lib/restash.ts
Restash class accepts a single parameter, which is your private API key. You can create an API key here.
Upload a file
File | Blob
required
The file or blob to upload.
UploadOptions object
An object with the following optional properties:
UploadFileResponseSuccess object
The information about the uploaded file.
Retrieve a file
RetrieveFileOptions object
An object with the following properties, either id or key is required:
RetrieveFileResponseSuccess object
The information about the retrieved file.
Delete a file
DeleteFileOptions object
An object with the following properties, either id or key is required:
DeleteFileResponseSuccess object
A confirmation of the deletion.
Additional resources
NPM package
Download and install the Restash Node.js SDK from NPM
Source code
View the complete source code for the Restash Node.js SDK