Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Methods

  • _addToQueue(filename: string, uploadID: string, partNumber: number, blob: Blob | <internal>.Buffer, options?: UploadOptions): Promise<{ ETag: string; PartNumber: number }>
  • Adds an upload to the queue. It will try to upload for 'opts.maxTriesForEachChunk' and fail if it couldn't upload after those many tries.

    Parameters

    • filename: string

      the path + filename for the file

    • uploadID: string

      the upload ID acquired by the 'createMultipartUpload' function call

    • partNumber: number
    • blob: Blob | <internal>.Buffer

      the portion of the file to be uploaded

    • Optional options: UploadOptions

      see the uploadFile function

    Returns Promise<{ ETag: string; PartNumber: number }>

  • _completeMultipartUpload(filename: string, uploadID: string, parts: { ETag: String; PartNumber: number }[], options?: UploadOptions): Promise<{ file: string }>
  • Finishes a multipart upload instance

    Parameters

    • filename: string

      the path + filename for the file

    • uploadID: string

      the upload ID acquired by the 'createMultipartUpload' function call

    • parts: { ETag: String; PartNumber: number }[]

      all the parts uploaded to the file

    • Optional options: UploadOptions

      the upload options for this file

    Returns Promise<{ file: string }>

  • _uploadPart(filename: string, uploadID: string, partNumber: number, blob: Blob | <internal>.Buffer, options?: UploadOptions): Promise<{ ETag: string; PartNumber: number }>
  • Uploads a single part to TagoIO

    Parameters

    • filename: string

      the path + filename for the file

    • uploadID: string

      the upload ID acquired by the 'createMultipartUpload' function call

    • partNumber: number

      the sequential part number for the upload. This should be 1 in the first call, then 2 in the second call, so on and so forth

    • blob: Blob | <internal>.Buffer

      the portion of the file to be uploaded

    • Optional options: UploadOptions

      the upload options for this file

    Returns Promise<{ ETag: string; PartNumber: number }>

  • checkPermission(file: string): Promise<{ public: boolean }>
  • Copy Files

    example
    fileList: [
    {
    from: "/myfiles/myOldName.ext",
    to: "/myfiles/newFolder/andNewName.ext"
    }
    ]

    Parameters

    • fileList: CopyFiles[]

      Array of copy actions to be made

    Returns Promise<string>

  • delete(files: string[]): Promise<string>
  • getFileMD5(url: string): Promise<string>
  • Get file md5 with authenticate token for privates files

    Parameters

    • url: string

      Full TagoIO File url

    Returns Promise<string>

  • getFileURLSigned(url: string): Promise<string>
  • Get a file url with authenticate token valid for 120 seconds

    Parameters

    • url: string

      Full TagoIO File url

    Returns Promise<string>

  • Move/Rename Files

    example
    fileList: [
    {
    from: "/myfiles/myOldName.ext",
    to: "/myfiles/newFolder/andNewName.ext"
    }
    ]

    Parameters

    • fileList: MoveFiles[]

      Array move actions to be made

    Returns Promise<string>

  • uploadBase64(fileList: Base64File[]): Promise<string>
  • Upload an array of files(Base64) to TagoIO The filename parameter is also full path

    example
    fileList: [
    {
    filename: "/myfiles/myfile.ext",
    file: "StringWithBase64"
    }
    ]

    Parameters

    • fileList: Base64File[]

      Array of files data to be uploaded

    Returns Promise<string>

  • Uploads a single file to TagoIO. The upload is multipart, meaning that the file will be divided and sent in chunks, resulting in multiple requests being made.

    Parameters

    • file: Blob | <internal>.Buffer

      the file to be uploaded

    • filename: string

      the path + filename for the file

    • Optional options: UploadOptions

      the upload options for this file

    Returns Promise<{ file: string }>