File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,18 @@ def _validate_size(self):
139139 error_message = (
140140 f"localFileTotalSize { file_size_total } exceeds "
141141 f"the maximum contentLength limit { file_size_limit } defined in the condition."
142- f"If you want to upload larger files, please contact us to lift the restriction."
142+ f"If you are using the free tier, "
143+ f"you may switch to the pay-as-you-go volume plan to support uploading larger files."
144+ )
145+ raise ValueError (error_message )
146+
147+ file_number_limit = self .volume_info ["condition" ]["maxFileNumber" ]
148+ if file_number_limit and len (self .local_file_paths ) > file_number_limit :
149+ error_message = (
150+ f"localFileTotalNumber { len (self .local_file_paths )} exceeds "
151+ f"the maximum fileNumber limit { file_number_limit } defined in the condition."
152+ f"If you are using the free tier, "
153+ f"you may switch to the pay-as-you-go volume plan to support uploading larger files."
143154 )
144155 raise ValueError (error_message )
145156
You can’t perform that action at this time.
0 commit comments