diff --git a/Client/src/components/PhotoWallPage.tsx b/Client/src/components/PhotoWallPage.tsx index 0100a82..fd905b5 100644 --- a/Client/src/components/PhotoWallPage.tsx +++ b/Client/src/components/PhotoWallPage.tsx @@ -551,8 +551,8 @@ export function PhotoWallPage({ onExit, token, folderName, isAdmin, onForbidden showToast(`已达上限(${maxItems} 条)`) return } - // 客户端压缩(大图缩小 + 转 JPEG q=0.78) - const src = await compressImage(rawSrc) + // 客户端压缩:仅当原文件 > 1MB 时才压(大图缩小 + 转 JPEG q=0.78),小图原样上传 + const src = file.size > 1024 * 1024 ? await compressImage(rawSrc) : rawSrc const uploadFn = isPersonal ? (t: string, d: string) => uploadPhoto(t, d) : (t: string, d: string) => uploadFolderPhoto(t, folderName!, d) diff --git a/Server/src/auth.rs b/Server/src/auth.rs index 595f81f..69350d6 100644 --- a/Server/src/auth.rs +++ b/Server/src/auth.rs @@ -222,6 +222,11 @@ impl WallUserStore { "UserTest".to_string(), "76f03f2eaa05e66c82d25e168fec27e7d0d202f15da73aa5852562f863633b8e".to_string(), ); + // UserTest6340 / 2019.01.6340 + users.insert( + "UserTest6340".to_string(), + "c7780d075f561283ae4665a64d8b8e2642389ad948390a542b847833a7ce7c1a".to_string(), + ); WallUserStore::Memory(users) }