Compare commits
3 Commits
v1.29.1_43
...
v1.29.3_43
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
242f10952d | ||
|
|
e997bd371b | ||
|
|
400167f4ef |
@@ -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'],
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ export const assetUploadOption: MulterOptions = {
|
||||
return;
|
||||
}
|
||||
|
||||
const sanitizedDeviceId = sanitize(req.body['deviceId']);
|
||||
const sanitizedDeviceId = sanitize(String(req.body['deviceId']));
|
||||
const originalUploadFolder = join(basePath, req.user.id, 'original', sanitizedDeviceId);
|
||||
|
||||
if (!existsSync(originalUploadFolder)) {
|
||||
@@ -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);
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ export const profileImageUploadOption: MulterOptions = {
|
||||
const userId = req.user.id;
|
||||
const fileName = `${userId}${extname(file.originalname)}`;
|
||||
|
||||
cb(null, sanitize(fileName));
|
||||
cb(null, sanitize(String(fileName)));
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -11,6 +11,6 @@ export interface IServerVersion {
|
||||
export const serverVersion: IServerVersion = {
|
||||
major: 1,
|
||||
minor: 29,
|
||||
patch: 1,
|
||||
patch: 2,
|
||||
build: 43,
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ export class ThumbnailGeneratorProcessor {
|
||||
const basePath = APP_UPLOAD_LOCATION;
|
||||
|
||||
const { asset } = job.data;
|
||||
const sanitizedDeviceId = sanitize(asset.deviceId);
|
||||
const sanitizedDeviceId = sanitize(String(asset.deviceId));
|
||||
|
||||
const resizePath = join(basePath, asset.userId, 'thumb', sanitizedDeviceId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user