mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix(server): query only image (#724)
This commit is contained in:
parent
e997bd371b
commit
242f10952d
@ -171,7 +171,6 @@ export class AssetRepository implements IAssetRepository {
|
||||
.createQueryBuilder('asset')
|
||||
.where('asset.userId = :userId', { userId: userId })
|
||||
.andWhere('asset.resizePath is not NULL')
|
||||
.andWhere('asset.type = :type', { type: AssetType.IMAGE })
|
||||
.leftJoinAndSelect('asset.exifInfo', 'exifInfo')
|
||||
.orderBy('asset.createdAt', 'DESC');
|
||||
|
||||
@ -226,7 +225,6 @@ export class AssetRepository implements IAssetRepository {
|
||||
where: {
|
||||
userId: userId,
|
||||
deviceId: deviceId,
|
||||
type: AssetType.IMAGE,
|
||||
},
|
||||
select: ['deviceAssetId'],
|
||||
});
|
||||
|
@ -39,8 +39,8 @@ export const assetUploadOption: MulterOptions = {
|
||||
filename: (req: Request, file: Express.Multer.File, cb: any) => {
|
||||
const fileNameUUID = randomUUID();
|
||||
const fileName = `${fileNameUUID}${req.body['fileExtension'].toLowerCase()}`;
|
||||
|
||||
cb(null, sanitize(fileName));
|
||||
const sanitizedFileName = sanitize(fileName);
|
||||
cb(null, sanitizedFileName);
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user