Manage Applications

    Upload a part


    Updates a chunk of an upload session for a file.



    Path Parameters

    stringin pathrequired

    The ID of the upload session.

    Request Headers

    stringin headerrequired

    The byte range of the chunk.

    Must not overlap with the range of a part already uploaded this session.

    stringin headerrequired

    The RFC3230 message digest of the chunk uploaded.

    Only SHA-1 is supported. The SHA-1 digest must be Base64 encoded. The format of this header is as sha=BASE64_ENCODED_DIGEST.


    application/jsonUpload Part

    Chunk has been uploaded successfully.

    application/jsonClient Error

    Returns an error if the chunk conflicts with another chunk previously uploaded.

    application/jsonClient Error

    Returns an error if a precondition failed.

    application/jsonClient Error

    Returns an error if the content range does not match a specified range for the session.

    You can now try out some of our APIs live, right here in the documentation.
    Log In

    Request Example

    curl -X PUT \
         -H "Authorization: Bearer <ACCESS_TOKEN>" \
         -H "Digest: sha=fpRyg5eVQletdZqEKaFlqwBXJzM=" \
         -H "Content-Range: 8388608-16777215/445856194" \
         -H "Content-Type: application/octet-stream" \
         --data-binary @<FILE_NAME>
    upload_session = client.upload_session('11493C07ED3EABB6E59874D3A1EF3581')
    offset = upload_session.part_size * 3
    total_size = 26000000
    part_bytes = b'abcdefgh'
    part = upload_session.upload_part_bytes(part_bytes, offset, total_size)
    print('Successfully uploaded part ID {0}'.format(part['part_id']))
    // Upload the part starting at byte offset 8388608 to upload session '93D9A837B45F' with part ID 'feedbeef'
    client.files.uploadPart('93D9A837B45F', part, 8388608, 2147483648, {part_id: 'feedbeef'}, callback);

    Response Example

      "part_id": "6F2D3486",
      "offset": 16777216,
      "size": 3222784,
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"