@@ -304,15 +304,18 @@ def upload_file_part_by_url(
304304 :type request_body: ByteStream
305305 :param digest: The [RFC3230][1] message digest of the chunk uploaded.
306306
307- Only SHA1 is supported. The SHA1 digest must be base64
307+ `SHA-1` and `SHA-512` ([RFC5843][2]) are supported. The digest must be base64
308308 encoded. The format of this header is as
309- `sha=BASE64_ENCODED_DIGEST`.
309+ `sha=BASE64_ENCODED_DIGEST` for `SHA-1`, or
310+ `sha-512=BASE64_ENCODED_DIGEST` for `SHA-512`.
310311
311- To get the value for the `SHA` digest, use the
312+ To get the value for the digest, use the
312313 openSSL command to encode the file part:
313- `openssl sha1 -binary <FILE_PART_NAME> | base64`.
314+ `openssl sha1 -binary <FILE_PART_NAME> | base64` for `SHA-1`, or
315+ `openssl sha512 -binary <FILE_PART_NAME> | base64` for `SHA-512`.
314316
315317 [1]: https://tools.ietf.org/html/rfc3230
318+ [2]: https://tools.ietf.org/html/rfc5843
316319 :type digest: str
317320 :param content_range: The byte range of the chunk.
318321
@@ -378,15 +381,18 @@ def upload_file_part(
378381 :type request_body: ByteStream
379382 :param digest: The [RFC3230][1] message digest of the chunk uploaded.
380383
381- Only SHA1 is supported. The SHA1 digest must be base64
384+ `SHA-1` and `SHA-512` ([RFC5843][2]) are supported. The digest must be base64
382385 encoded. The format of this header is as
383- `sha=BASE64_ENCODED_DIGEST`.
386+ `sha=BASE64_ENCODED_DIGEST` for `SHA-1`, or
387+ `sha-512=BASE64_ENCODED_DIGEST` for `SHA-512`.
384388
385- To get the value for the `SHA` digest, use the
389+ To get the value for the digest, use the
386390 openSSL command to encode the file part:
387- `openssl sha1 -binary <FILE_PART_NAME> | base64`.
391+ `openssl sha1 -binary <FILE_PART_NAME> | base64` for `SHA-1`, or
392+ `openssl sha512 -binary <FILE_PART_NAME> | base64` for `SHA-512`.
388393
389394 [1]: https://tools.ietf.org/html/rfc3230
395+ [2]: https://tools.ietf.org/html/rfc5843
390396 :type digest: str
391397 :param content_range: The byte range of the chunk.
392398
@@ -650,10 +656,10 @@ def create_file_upload_session_plan_by_url(
650656 have already been uploaded (cache hits) and only uploading missing parts.
651657
652658
653- The actual endpoint URL is returned by the [`Create upload session`](e:/ /post-files-upload-sessions)
659+ The actual endpoint URL is returned by the [`Create upload session`](https://developer.box.com/reference /post-files-upload-sessions)
654660
655661
656- and [`Get upload session`](e:/ /get-files-upload-sessions-id) endpoints.
662+ and [`Get upload session`](https://developer.box.com/reference /get-files-upload-sessions-id) endpoints.
657663
658664 :param url: URL of createFileUploadSessionPlan method
659665 :type url: str
@@ -696,10 +702,10 @@ def create_file_upload_session_plan(
696702 have already been uploaded (cache hits) and only uploading missing parts.
697703
698704
699- The actual endpoint URL is returned by the [`Create upload session`](e:/ /post-files-upload-sessions)
705+ The actual endpoint URL is returned by the [`Create upload session`](https://developer.box.com/reference /post-files-upload-sessions)
700706
701707
702- and [`Get upload session`](e:/ /get-files-upload-sessions-id) endpoints.
708+ and [`Get upload session`](https://developer.box.com/reference /get-files-upload-sessions-id) endpoints.
703709
704710 :param upload_session_id: The ID of the upload session.
705711 Example: "D5E3F7A"
@@ -761,13 +767,27 @@ def create_file_upload_session_commit_by_url(
761767 :param url: URL of createFileUploadSessionCommit method
762768 :type url: str
763769 :param parts: The list details for the uploaded parts.
770+
771+ Each entry can include `sha1` or `sha512`. Include `sha512`
772+ on every entry or on none of them. A request where only
773+ some entries include `sha512` is rejected.
774+
775+ Include parts that the server already has, returned as
776+ `hits` by the [`Plan upload session`](https://developer.box.com/reference/post-files-upload-sessions-id-plan)
777+ endpoint. Use the `part_id`, `offset`, and `size` from the
778+ plan response. If the other entries include `sha512`,
779+ include the `sha512` value from the plan response.
780+ Otherwise, leave the hash out of these entries.
764781 :type parts: List[UploadPart]
765782 :param digest: The [RFC3230][1] message digest of the whole file.
766783
767784 Only SHA1 is supported. The SHA1 digest must be Base64
768785 encoded. The format of this header is as
769786 `sha=BASE64_ENCODED_DIGEST`.
770787
788+ `SHA-512` is not supported for the whole-file digest, even if
789+ the parts were uploaded with `SHA-512` digests.
790+
771791 [1]: https://tools.ietf.org/html/rfc3230
772792 :type digest: str
773793 :param if_match: Ensures this item hasn't recently changed before
@@ -837,13 +857,27 @@ def create_file_upload_session_commit(
837857 Example: "D5E3F7A"
838858 :type upload_session_id: str
839859 :param parts: The list details for the uploaded parts.
860+
861+ Each entry can include `sha1` or `sha512`. Include `sha512`
862+ on every entry or on none of them. A request where only
863+ some entries include `sha512` is rejected.
864+
865+ Include parts that the server already has, returned as
866+ `hits` by the [`Plan upload session`](https://developer.box.com/reference/post-files-upload-sessions-id-plan)
867+ endpoint. Use the `part_id`, `offset`, and `size` from the
868+ plan response. If the other entries include `sha512`,
869+ include the `sha512` value from the plan response.
870+ Otherwise, leave the hash out of these entries.
840871 :type parts: List[UploadPart]
841872 :param digest: The [RFC3230][1] message digest of the whole file.
842873
843874 Only SHA1 is supported. The SHA1 digest must be Base64
844875 encoded. The format of this header is as
845876 `sha=BASE64_ENCODED_DIGEST`.
846877
878+ `SHA-512` is not supported for the whole-file digest, even if
879+ the parts were uploaded with `SHA-512` digests.
880+
847881 [1]: https://tools.ietf.org/html/rfc3230
848882 :type digest: str
849883 :param if_match: Ensures this item hasn't recently changed before
0 commit comments