File system for a collection.
Collection
Create a new file
File content as stream or buffer
Optional
metadata: anyFile record metadata (see file record schema)
Optional
opts: UploadFileOpts = {}Options.
Get the metadata for a file
Will throw if the path is not found.
The file record value (metadata)
A file ID
Returns the HTTP url for a file.
The file URL
A file ID
Optional
includeToken: booleanRead a file into a buffer.
Will throw if the path is not found.
The file content. A Buffer object in Node.js, a ArrayBuffer object in the browser.
A file ID
Optional
opts: RangeOpts & Omit<RequestInit, "body"> & { body?: any; endpoint?: string; headers?: Record<string, string>; log?: ((msg: string) => void); opening?: boolean; params?: Record<string, any>; requestType?: "buffer" | "stream" | "json"; responseType?: "buffer" | "stream" | "json" | "text" | "raw"; token?: string } & { responseType: undefined }Optional
opts: RangeOpts & Omit<RequestInit, "body"> & { body?: any; endpoint?: string; headers?: Record<string, string>; log?: ((msg: string) => void); opening?: boolean; params?: Record<string, any>; requestType?: "buffer" | "stream" | "json"; responseType?: "buffer" | "stream" | "json" | "text" | "raw"; token?: string } & { responseType: "text" }Optional
opts: RangeOpts & Omit<RequestInit, "body"> & { body?: any; endpoint?: string; headers?: Record<string, string>; log?: ((msg: string) => void); opening?: boolean; params?: Record<string, any>; requestType?: "buffer" | "stream" | "json"; responseType?: "buffer" | "stream" | "json" | "text" | "raw"; token?: string } & { responseType: "buffer" }Optional
opts: RangeOpts & Omit<RequestInit, "body"> & { body?: any; endpoint?: string; headers?: Record<string, string>; log?: ((msg: string) => void); opening?: boolean; params?: Record<string, any>; requestType?: "buffer" | "stream" | "json"; responseType?: "buffer" | "stream" | "json" | "text" | "raw"; token?: string } & { responseType: "stream" }Optional
opts: RangeOpts & Omit<RequestInit, "body"> & { body?: any; endpoint?: string; headers?: Record<string, string>; log?: ((msg: string) => void); opening?: boolean; params?: Record<string, any>; requestType?: "buffer" | "stream" | "json"; responseType?: "buffer" | "stream" | "json" | "text" | "raw"; token?: string } & { responseType: "raw" }Update a file
The file record id
File content as stream or buffer
Optional
metadata: anyFile record metadata (see file record schema)
Optional
opts: UploadFileOpts = {}Options.
Generated using TypeDoc
File system for a collection.