first commit

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kunkunxiaomaoandClaude committed 2026-11-16 20:45:22 +08:00
commit 9c5fef1a4d
412 files changed
+94582

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
from __future__ import annotations
from pydantic import BaseModel, Field
class UploadInitRequest(BaseModel):
sha256: str = Field(min_length=64, max_length=64)
file_name: str = Field(min_length=1, max_length=255)
file_size: int = Field(ge=0)
mime_type: str | None = Field(default=None, max_length=50)
resource_type: str = Field(default="image", max_length=20)
class UploadInitResponse(BaseModel):
upload_id: str
exists: bool
chunk_size: int
received_size: int
file_id: str | None = None
class UploadStatusResponse(BaseModel):
upload_id: str
sha256: str
file_name: str
file_size: int
received_size: int
status: str
class UploadCompleteRequest(BaseModel):
upload_id: str
class UploadCompleteResponse(BaseModel):
file_id: str
sha256: str
storage_path: str
file_size: int