feat(api): listUploads 会话条目内嵌照片预览(现签 thumb/browse)

- 契约 UploadSessionPhoto 增可选 preview(PhotoPreview;旧客户端零 break)
- list() 批量查 photo_variants,uploader 视角签发:thumb+browse 齐备且
  未隐藏/删除才签(「隐藏是运营动作」口径从严;无变体→字段缺省)
- presign 本地 SigV4 无网络开销,TTL 同全局 900s
- 顺手修 batch-ops ⑦:交接后上传 bytes 撞查重改 71007(登记旧账清偿)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-29 12:04:06 +08:00
parent 3833bc3bc6
commit f1912998a8
5 changed files with 137 additions and 22 deletions
+3 -2
View File
@@ -652,7 +652,8 @@ describe('batch hide + owner transfer (e2e)', () => {
expect(oldOwnerManage.status).toBe(403);
expect(oldOwnerManage.body.code).toBe(ErrorCodes.AUTH_FORBIDDEN);
// 保留协作者仍可上传(成员行有效即「已加入的相册」)。
// 保留协作者仍可上传(成员行有效即「已加入的相册」)。bytes=71007
// 避开本册 ownerA 已传照片的字节数(init ③.5 查重会 409 拦同 bytes)。
const upload = await request(cnBase)
.post('/v1/uploads')
.set('Authorization', `Bearer ${ownerAToken}`)
@@ -660,7 +661,7 @@ describe('batch hide + owner transfer (e2e)', () => {
albumId: albumAId,
clientTaskId: 'bo-upload-after-transfer',
filename: 'after-transfer.jpg',
bytes: 1000,
bytes: 71007,
contentType: 'image/jpeg',
});
expect(upload.status).toBe(201);