Feat/add-remote-file-upload-api (#9906)

This commit is contained in:
-LAN- 2024-11-01 15:51:22 +08:00 • committed by GitHub
commit 9ac2bb30f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 788 additions and 272 deletions

View file

@ -0,0 +1,25 @@
from libs.exception import BaseHTTPException
class FileTooLargeError(BaseHTTPException):
error_code = "file_too_large"
description = "File size exceeded. {message}"
code = 413
class UnsupportedFileTypeError(BaseHTTPException):
error_code = "unsupported_file_type"
description = "File type not allowed."
code = 415
class TooManyFilesError(BaseHTTPException):
error_code = "too_many_files"
description = "Only one file is allowed."
code = 400
class NoFileUploadedError(BaseHTTPException):
error_code = "no_file_uploaded"
description = "Please upload your file."
code = 400