Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FileUploadOptions

Defines the options available that can be set during file upload

export
interface

FileUploadOptions

Hierarchy

  • FileUploadOptions

Index

Properties

contentType: string

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

createBucket: boolean

Specifies whether to create the bucket while uploading the file. If a bucket with the provided name does not exists and if createBucket is marked as true then creates a new bucket. Defaults to false.

isPublic: boolean

Specifies whether file is publicy accessible or not. Defaults to the bucket's privacy setting if not specified.

tags: string

Array of string values that will be added to the file metadata.

Methods

  • onProgress(uploaded: number, total: number, percentComplete: number): any
  • Callback function to call during file upload.

    For the moment, this method can only be used in clients where XMLHttpRequest object is available (e.g., browsers).

    Parameters

    • uploaded: number

      Total bytes uploaded

    • total: number

      Total size of file in bytes

    • percentComplete: number

      Percent uploaded (an integer between 0-100), basicly uploaded/total rounded to the nearest integer

    Returns any

Generated using TypeDoc