@@ -780,6 +780,8 @@ union UploadError
780
780
"The supplied property group is invalid. The file has uploaded without property groups."
781
781
payload_too_large
782
782
"The request payload must be at most 150 MB."
783
+ content_hash_mismatch
784
+ "The content received by the Dropbox server in this call does not match the provided content hash."
783
785
784
786
struct UploadSessionOffsetError
785
787
correct_offset UInt64
@@ -792,6 +794,8 @@ union UploadSessionStartError
792
794
"Can not start a closed concurrent upload session."
793
795
payload_too_large
794
796
"The request payload must be at most 150 MB."
797
+ content_hash_mismatch
798
+ "The content received by the Dropbox server in this call does not match the provided content hash."
795
799
796
800
union UploadSessionLookupError
797
801
not_found
@@ -817,6 +821,10 @@ union UploadSessionLookupError
817
821
payload_too_large
818
822
"The request payload must be at most 150 MB."
819
823
824
+ union UploadSessionAppendError extends UploadSessionLookupError
825
+ content_hash_mismatch
826
+ "The content received by the Dropbox server in this call does not match the provided content hash."
827
+
820
828
union UploadSessionFinishError
821
829
lookup_failed UploadSessionLookupError
822
830
"The session arguments are incorrect; the value explains the reason."
@@ -840,6 +848,8 @@ union UploadSessionFinishError
840
848
"Not all pieces of data were uploaded before trying to finish the session."
841
849
payload_too_large
842
850
"The request payload must be at most 150 MB."
851
+ content_hash_mismatch
852
+ "The content received by the Dropbox server in this call does not match the provided content hash."
843
853
844
854
# Req/Resp
845
855
@@ -860,6 +870,11 @@ struct UploadSessionStartArg
860
870
"Type of upload session you want to start. If not specified, default is
861
871
:field:`UploadSessionType.sequential`."
862
872
873
+ content_hash Sha256HexHash?
874
+ "NOT YET SUPPORTED. A hash of the file content uploaded in this call. If provided and the
875
+ uploaded content does not match this hash, an error will be returned. For more information see our
876
+ :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
877
+
863
878
example with_close
864
879
close = false
865
880
@@ -922,11 +937,15 @@ struct UploadSessionAppendArg
922
937
"If true, the current session will be closed, at which point
923
938
you won't be able to call :route:`upload_session/append:2`
924
939
anymore with the current session."
940
+ content_hash Sha256HexHash?
941
+ "NOT YET SUPPORTED. A hash of the file content uploaded in this call. If provided and the
942
+ uploaded content does not match this hash, an error will be returned. For more information see our
943
+ :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
925
944
926
945
example default
927
946
cursor = default
928
947
929
- route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionLookupError )
948
+ route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionAppendError )
930
949
"Append more data to an upload session.
931
950
932
951
When the parameter close is set, this call will close the session.
@@ -960,7 +979,7 @@ struct UploadSessionCursor
960
979
session_id = "8dd9d57374911153"
961
980
offset = 1073741824
962
981
963
- route upload_session/append (UploadSessionCursor, Void, UploadSessionLookupError ) deprecated by upload_session/append:2
982
+ route upload_session/append (UploadSessionCursor, Void, UploadSessionAppendError ) deprecated by upload_session/append:2
964
983
"Append more data to an upload session.
965
984
966
985
A single request should not upload more than 150 MB. The maximum size of
@@ -1017,6 +1036,8 @@ union_closed WriteMode
1017
1036
example with_revision
1018
1037
update = "a1c10ce0dd78"
1019
1038
1039
+ # NOTE: If you update this, also update dropbox.api.upload_session_utils.COMMIT_INFO_FIELDS
1040
+ # or else tests will fail
1020
1041
struct CommitInfo
1021
1042
path WritePathOrId
1022
1043
"Path in the user's Dropbox to save the file."
@@ -1065,6 +1086,10 @@ struct UploadSessionFinishArg
1065
1086
"Contains the upload session ID and the offset."
1066
1087
commit CommitInfo
1067
1088
"Contains the path and other optional modifiers for the commit."
1089
+ content_hash Sha256HexHash?
1090
+ "NOT YET SUPPORTED. A hash of the file content uploaded in this call. If provided and the
1091
+ uploaded content does not match this hash, an error will be returned. For more information see our
1092
+ :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
1068
1093
1069
1094
example default
1070
1095
cursor = default
@@ -1096,7 +1121,13 @@ route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSession
1096
1121
select_admin_mode = "team_admin"
1097
1122
scope= "files.content.write"
1098
1123
1099
- route upload (CommitInfo, FileMetadata, UploadError)
1124
+ struct UploadArg extends CommitInfo
1125
+ content_hash Sha256HexHash?
1126
+ "NOT YET SUPPORTED. A hash of the file content uploaded in this call. If provided and the
1127
+ uploaded content does not match this hash, an error will be returned. For more information see our
1128
+ :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
1129
+
1130
+ route upload (UploadArg, FileMetadata, UploadError)
1100
1131
"Create a new file with the contents provided in the request.
1101
1132
1102
1133
Do not use this to upload a file larger than 150 MB. Instead, create an
@@ -2854,13 +2885,12 @@ union_closed AlphaGetMetadataError extends GetMetadataError
2854
2885
properties_error file_properties.LookUpPropertiesError
2855
2886
2856
2887
#
2857
- # Patched /upload that accepts properties
2888
+ # Alpha /upload, originally for properties API. Can be used to pilot new functionality.
2858
2889
#
2859
2890
2860
- route alpha/upload (CommitInfoWithProperties, FileMetadata, UploadErrorWithProperties) deprecated by alpha/upload
2861
- "Create a new file with the contents provided in the request. Note that this
2862
- endpoint is part of the properties API alpha and is slightly different from
2863
- :route:`upload`.
2891
+ route alpha/upload (UploadArg, FileMetadata, UploadError) deprecated by upload
2892
+ "Create a new file with the contents provided in the request. Note that the
2893
+ behavior of this alpha endpoint is unstable and subject to change.
2864
2894
2865
2895
Do not use this to upload a file larger than 150 MB. Instead, create an
2866
2896
upload session with :route:`upload_session/start`."
@@ -2872,15 +2902,6 @@ route alpha/upload (CommitInfoWithProperties, FileMetadata, UploadErrorWithPrope
2872
2902
allow_app_folder_app = true
2873
2903
scope = "files.content.write"
2874
2904
2875
- struct CommitInfoWithProperties extends CommitInfo
2876
- example default
2877
- path = "/Homework/math/Matrices.txt"
2878
- autorename = true
2879
-
2880
- union UploadErrorWithProperties extends UploadError
2881
- example default
2882
- properties_error = does_not_fit_template
2883
-
2884
2905
#
2885
2906
# Deprecated File Properties routes
2886
2907
#
0 commit comments