Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/appwrite/mod.ts>Storage#getFilePreview

[READ-ONLY] Official Appwrite Deno SDK 🦕
Latest
method Storage.prototype.getFilePreview
Re-export
import { Storage } from "https://deno.land/x/appwrite@12.1.0/mod.ts";

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. Preview is supported only for image files smaller than 10MB.

Parameters

bucketId: string
fileId: string
optional
width: number
optional
height: number
optional
gravity: ImageGravity
optional
quality: number
optional
borderWidth: number
optional
borderColor: string
optional
borderRadius: number
optional
opacity: number
optional
rotation: number
optional
background: string
optional
output: ImageFormat

Returns

Promise<ArrayBuffer>