Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FileOptions

import type { FileOptions } from "https://esm.sh/@supabase/storage-js@2.89.0/dist/index.d.mts";
interface FileOptions {
cacheControl?: string;
contentType?: string;
duplex?: string;
headers?: Record<string, string>;
metadata?: Record<string, any>;
upsert?: boolean;
}

§Properties

§
cacheControl?: string
[src]

The number of seconds the asset is cached in the browser and in the Supabase CDN. This is set in the Cache-Control: max-age=<seconds> header. Defaults to 3600 seconds.

§
contentType?: string
[src]

the Content-Type header value. Should be specified if using a fileBody that is neither Blob nor File nor FormData, otherwise will default to text/plain;charset=UTF-8.

§
duplex?: string
[src]

The duplex option is a string parameter that enables or disables duplex streaming, allowing for both reading and writing data in the same stream. It can be passed as an option to the fetch() method.

§
headers?: Record<string, string>
[src]

Optionally add extra headers

§
metadata?: Record<string, any>
[src]

The metadata option is an object that allows you to store additional information about the file. This information can be used to filter and search for files. The metadata object can contain any key-value pairs you want to store.

§
upsert?: boolean
[src]

When upsert is set to true, the file is overwritten if it exists. When set to false, an error is thrown if the object already exists. Defaults to false.