@musallam/storage-and-collaboration-client
    Preparing search index...

    Function finalizeBlockBasedFileReplacement

    • This endpoint finalizes the block replacement process by initiating an asynchronous job that will merge all uploaded blocks and replace the existing file's content. The file's assetId, permissions, and metadata are preserved.


      NOTE:

      The following rules govern how the server interprets the finalization request for a block-based replacement:

      • The size provided during the initiate request is treated as an estimate, not a strict validation boundary.
      • Clients are not penalized if the actual uploaded content size differs from the declared size.
      • In future, clients will be able to extend block sets if their initial estimate is too low (see Future Enhancements).
      • Clients are allowed to skip any block from the original transferLinks list, as long as part numbers remain ordered and are accurately reported in the usedTransferLinks array during finalize.
      • Skipped parts should simply be omitted from usedTransferLinks.
      • The used part numbers explicitly listed in the usedTransferLinks array.
      • The server will stitch together content in the order of these part numbers.
      • Any parts not listed will be ignored even if data was uploaded to them.

      Parameters

      Returns Promise<FileUploadFinalizeResponseResponse>