chore(server): optional originalMimeType in asset response payload (#10272)

* chore(server): optional originalMimeType in asset response payload

* lint

* Update web/src/lib/utils/asset-utils.ts

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>

* fix permission of shared link

* test

* test

* test

* test server

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Alex 2024-06-13 09:21:47 -05:00 committed by GitHub
parent df31eb1214
commit e2a2c86a31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 126 additions and 14 deletions

View file

@ -0,0 +1,19 @@
import { faker } from '@faker-js/faker';
import { SharedLinkType, type SharedLinkResponseDto } from '@immich/sdk';
import { Sync } from 'factory.ts';
export const sharedLinkFactory = Sync.makeFactory<SharedLinkResponseDto>({
id: Sync.each(() => faker.string.uuid()),
description: Sync.each(() => faker.word.sample()),
password: Sync.each(() => faker.word.sample()),
token: Sync.each(() => faker.word.sample()),
userId: Sync.each(() => faker.string.uuid()),
key: Sync.each(() => faker.word.sample()),
type: Sync.each(() => faker.helpers.enumValue(SharedLinkType)),
createdAt: Sync.each(() => faker.date.past().toISOString()),
expiresAt: Sync.each(() => faker.date.past().toISOString()),
assets: [],
allowUpload: Sync.each(() => faker.datatype.boolean()),
allowDownload: Sync.each(() => faker.datatype.boolean()),
showMetadata: Sync.each(() => faker.datatype.boolean()),
});