feat(api,webui): implement image compression, auto-refresh for uploads, and infinite pagination for collections/shares

This commit is contained in:
yiling
2026-06-08 12:14:14 +08:00
parent 2ea7706d82
commit 688e1a4ede
12 changed files with 232 additions and 94 deletions
+3 -3
View File
@@ -1446,7 +1446,7 @@ describe('AssetService', () => {
expect(remainingChildren).toBe(0)
})
it('should delete the entire directory prefix for assets with complex keys (e.g., file/ULID/raw)', async () => {
it('should delete the entire directory prefix for assets with complex keys (e.g., files/ULID/raw)', async () => {
const { project } = await setupBasicAssets()
const { s3Service } = await import('../s3/s3')
@@ -1460,7 +1460,7 @@ describe('AssetService', () => {
project: { connect: { id: project.id } },
storageKey: {
create: {
key: 'file/01KSBRJVY3DPK111S2MECFKDQ4/raw',
key: 'files/01KSBRJVY3DPK111S2MECFKDQ4/raw',
createdAt: new Date(Date.now() - 25 * 60 * 60 * 1000),
},
},
@@ -1478,7 +1478,7 @@ describe('AssetService', () => {
// Verify deletePrefix was called with the correct prefix instead of just deleteObject
expect(s3Service.deletePrefix).toHaveBeenCalledWith(
expect.any(String),
'file/01KSBRJVY3DPK111S2MECFKDQ4/',
'files/01KSBRJVY3DPK111S2MECFKDQ4/',
)
// Verify record is gone
+1 -1
View File
@@ -116,7 +116,7 @@ export class UploadService {
const assetType = file.type === 'folder' ? AssetType.folder : AssetType.file
let key: string | null = null
if (assetType === AssetType.file) {
key = `file/${ulid()}/raw`
key = `files/${ulid()}/raw`
}
const newAsset = await this.prismaClient.asset.create({