refactor file upload process to use MD5 instead of SHA-1 for hash calculation and update related API and model structures

This commit is contained in:
nyne
2025-05-16 16:55:45 +08:00
parent 313e696248
commit 7bfd33c714
7 changed files with 61 additions and 139 deletions

View File

@@ -520,7 +520,7 @@ class Network {
}
async initFileUpload(filename: string, description: string, fileSize: number,
resourceId: number, storageId: number, sha1: string): Promise<Response<UploadingFile>> {
resourceId: number, storageId: number, md5: string): Promise<Response<UploadingFile>> {
try {
const response = await axios.post(`${this.apiBaseUrl}/files/upload/init`, {
filename,
@@ -528,7 +528,7 @@ class Network {
file_size: fileSize,
resource_id: resourceId,
storage_id: storageId,
sha1
md5
});
return response.data;
} catch (e: any) {