Hierarchy

Constructors

Methods

  • 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 | Buffer

      the portion of the file to be uploaded

    • Optional options: UploadOptions

      see the uploadFile function

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

  • 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;
    }>

  • 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 | Buffer

      the portion of the file to be uploaded

    • Optional options: UploadOptions

      the upload options for this file

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

  • Change visibility from files

    Parameters

    • filesVisibility: FilesPermission[]

      An Array with files and their visibility to be setted

    Returns Promise<string>

  • Check if file is private or public

    Parameters

    • file: string

      Path of file

    Returns Promise<{
        public: boolean;
    }>

  • Copy Files

    Parameters

    • fileList: CopyFiles[]

      Array of copy actions to be made

    Returns Promise<string>

    Example

    fileList: [
    {
    from: "/myfiles/myOldName.ext",
    to: "/myfiles/newFolder/andNewName.ext"
    }
    ]
  • Delete Folder or Files

    Parameters

    • files: string[]

      An array of files or folders to be deleted

    Returns Promise<string>

  • Get file md5 with authenticate token for privates files

    Parameters

    • url: string

      Full TagoIO File url

    Returns 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

    Parameters

    • fileList: MoveFiles[]

      Array move actions to be made

    Returns Promise<string>

    Example

    fileList: [
    {
    from: "/myfiles/myOldName.ext",
    to: "/myfiles/newFolder/andNewName.ext"
    }
    ]
  • Upload an array of files(Base64) to TagoIO The filename parameter is also full path

    Parameters

    • fileList: Base64File[]

      Array of files data to be uploaded

    Returns Promise<string>

    Example

    fileList: [
    {
    filename: "/myfiles/myfile.ext",
    file: "StringWithBase64"
    }
    ]
  • 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 | 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;
    }>