import { Storage } from "https://deno.land/x/appwrite@2.0.2/mod.ts";
Methods
Create File
Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments.
Delete File
Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
Get File
Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
Get File for Download
Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
Get File Preview
Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image.
Get File for View
Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
List Files
Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. Learn more about different API modes.
Update File
Update a file by its unique ID. Only users with write permissions have access to update this resource.