mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 14:21:46 +00:00
adding default value of small when getting thumbnail
This commit is contained in:
@@ -585,7 +585,6 @@ export async function streamSynologyAsset(
|
|||||||
targetUserId: number,
|
targetUserId: number,
|
||||||
photoId: string,
|
photoId: string,
|
||||||
kind: 'thumbnail' | 'original',
|
kind: 'thumbnail' | 'original',
|
||||||
size?: string,
|
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const parsedId = _splitPackedSynologyId(photoId);
|
const parsedId = _splitPackedSynologyId(photoId);
|
||||||
if (!parsedId) {
|
if (!parsedId) {
|
||||||
@@ -609,6 +608,8 @@ export async function streamSynologyAsset(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//size: 'sm' 240px| 'm' 320px| 'xl' 1280px| 'preview' ?
|
||||||
const params = kind === 'thumbnail'
|
const params = kind === 'thumbnail'
|
||||||
? new URLSearchParams({
|
? new URLSearchParams({
|
||||||
api: 'SYNO.Foto.Thumbnail',
|
api: 'SYNO.Foto.Thumbnail',
|
||||||
@@ -617,7 +618,7 @@ export async function streamSynologyAsset(
|
|||||||
mode: 'download',
|
mode: 'download',
|
||||||
id: parsedId.id,
|
id: parsedId.id,
|
||||||
type: 'unit',
|
type: 'unit',
|
||||||
size: size,
|
size: 'sm',
|
||||||
cache_key: parsedId.cacheKey,
|
cache_key: parsedId.cacheKey,
|
||||||
_sid: sid.data,
|
_sid: sid.data,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user