Skip to content

routier-collection


routier-collection / plugins/blob/src / createDirectUploader

Function: createDirectUploader() ​

createDirectUploader(options): object

Defined in: plugins/blob/src/direct.ts:94

The browser half. Holds no credentials and never talks to storage except to PUT.

Parameters ​

options ​

DirectUploaderOptions

Returns ​

upload() ​

upload(content, uploadOptions): Promise<FileReferenceValue>

Hashes, asks for a grant, uploads if needed, and returns the reference.

Skips the transfer entirely when the server says the content is already stored.

Parameters ​

content ​

FileContent

uploadOptions ​

UploadOptions = {}

Returns ​

Promise<FileReferenceValue>

Released under the MIT License.