mirror of
https://github.com/immich-app/immich.git
synced 2025-07-31 15:08:44 -04:00
fix: send filename when viewing the original file (#20005)
* feat: add fileName to downloadOriginal response * test: add fileName to ImmichFileResponse for downloadOriginal * lint: use single quotes for fileName string in test
This commit is contained in:
parent
635f5de186
commit
dcfe8d5ade
@ -505,6 +505,7 @@ describe(AssetMediaService.name, () => {
|
|||||||
await expect(sut.downloadOriginal(authStub.admin, 'asset-1')).resolves.toEqual(
|
await expect(sut.downloadOriginal(authStub.admin, 'asset-1')).resolves.toEqual(
|
||||||
new ImmichFileResponse({
|
new ImmichFileResponse({
|
||||||
path: '/original/path.jpg',
|
path: '/original/path.jpg',
|
||||||
|
fileName: 'asset-id.jpg',
|
||||||
contentType: 'image/jpeg',
|
contentType: 'image/jpeg',
|
||||||
cacheControl: CacheControl.PrivateWithCache,
|
cacheControl: CacheControl.PrivateWithCache,
|
||||||
}),
|
}),
|
||||||
|
@ -197,6 +197,7 @@ export class AssetMediaService extends BaseService {
|
|||||||
|
|
||||||
return new ImmichFileResponse({
|
return new ImmichFileResponse({
|
||||||
path: asset.originalPath,
|
path: asset.originalPath,
|
||||||
|
fileName: asset.originalFileName,
|
||||||
contentType: mimeTypes.lookup(asset.originalPath),
|
contentType: mimeTypes.lookup(asset.originalPath),
|
||||||
cacheControl: CacheControl.PrivateWithCache,
|
cacheControl: CacheControl.PrivateWithCache,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user