@musallam/storage-and-collaboration-client
    Preparing search index...
    • This, along with the set of related APIs enables the upload of large files by splitting the content into multiple blocks, transferred over separate requests. This method is ideal for files larger than 10 MB, offering parallelism, resumability, and efficient error recovery.


      NOTE: For files 10 MB or larger, direct upload is not supported. Clients must use this block-based upload workflow. block-based transfer is allowed for any size


      Client sends a POST request to initiate the block upload and receives a response with URLs for uploading individual blocks and finalizing the transfer.

      Client issues PUT requests to the provided Block Transfer URLs, sending file data in chunks. These can be uploaded in parallel.


      NOTE: ####Uploading File Blocks After receiving transferLinks, clients can use them to upload individual blocks: PUT

      • Authorization Header: Must NOT be included in the request.
      • Success Response: 200 OK indicates successful block upload.
      • Expiration Handling: Each upload session is time-bound. If blocks are not uploaded within the specified expiration window (urlExpirationDate field from the initiation response), the operation may fail.
        • Always check and respect the urlExpirationDate timestamp in the response from the Block Upload Init endpoint.

      After all blocks are uploaded, the client calls the Block Finalize URL to trigger the upload to the destination location.

      Finalize operation's response includes a Monitor URL to check the final status.

      Initialize the Block-Based Upload

      This endpoint allows clients to initiate the creation of a new file using block-based transfer.


      NOTE: The expiration duration of transfer URLs is explicitly provided to the client in the response


      Parameters

      Returns Promise<FileUploadInitResponseResponse>