mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
Fixed EACCES permission when mounting bind volume, add dynamic location for backup directory
This commit is contained in:
parent
4f47c8c06b
commit
56627caf5b
6 changed files with 17 additions and 10 deletions
server/src/modules/image-optimize
|
@ -7,6 +7,7 @@ import sharp from 'sharp';
|
|||
import { existsSync, mkdirSync, readFile } from 'fs';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import ffmpeg from 'fluent-ffmpeg';
|
||||
import { APP_UPLOAD_LOCATION } from '../../constants/upload_location.constant';
|
||||
|
||||
@Processor('optimize')
|
||||
export class ImageOptimizeProcessor {
|
||||
|
@ -21,7 +22,7 @@ export class ImageOptimizeProcessor {
|
|||
async resizeUploadedImage(job: Job) {
|
||||
const { savedAsset }: { savedAsset: AssetEntity } = job.data;
|
||||
|
||||
const basePath = this.configService.get('UPLOAD_LOCATION');
|
||||
const basePath = APP_UPLOAD_LOCATION;
|
||||
const resizePath = savedAsset.originalPath.replace('/original/', '/thumb/');
|
||||
|
||||
// Create folder for thumb image if not exist
|
||||
|
@ -77,7 +78,7 @@ export class ImageOptimizeProcessor {
|
|||
async resizeUploadedVideo(job: Job) {
|
||||
const { savedAsset, filename }: { savedAsset: AssetEntity; filename: String } = job.data;
|
||||
|
||||
const basePath = this.configService.get('UPLOAD_LOCATION');
|
||||
const basePath = APP_UPLOAD_LOCATION;
|
||||
// const resizePath = savedAsset.originalPath.replace('/original/', '/thumb/');
|
||||
// Create folder for thumb image if not exist
|
||||
const resizeDir = `${basePath}/${savedAsset.userId}/thumb/${savedAsset.deviceId}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue