adding dotfile support
This commit is contained in:
parent
3e060e2b8d
commit
720e9b60b1
@ -44,8 +44,7 @@ export class RenderingMWs {
|
|||||||
if (!req.resultPipe) {
|
if (!req.resultPipe) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
return res.sendFile(req.resultPipe, {maxAge: 31536000, dotfiles: 'allow'});
|
||||||
return res.sendFile(req.resultPipe, {maxAge: 31536000});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static renderOK(req: Request, res: Response, next: NextFunction) {
|
public static renderOK(req: Request, res: Response, next: NextFunction) {
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
import {Logger} from '../../Logger';
|
import {Logger} from '../../Logger';
|
||||||
import * as fs from 'fs';
|
import {promises as fsp} from 'fs';
|
||||||
import * as util from 'util';
|
|
||||||
import {FfmpegCommand} from 'fluent-ffmpeg';
|
import {FfmpegCommand} from 'fluent-ffmpeg';
|
||||||
import {FFmpegFactory} from '../FFmpegFactory';
|
import {FFmpegFactory} from '../FFmpegFactory';
|
||||||
import {ServerConfig} from '../../../common/config/private/IPrivateConfig';
|
import {ServerConfig} from '../../../common/config/private/IPrivateConfig';
|
||||||
|
|
||||||
const renamePr = util.promisify(fs.rename);
|
|
||||||
|
|
||||||
export interface VideoConverterInput {
|
export interface VideoConverterInput {
|
||||||
videoPath: string;
|
videoPath: string;
|
||||||
@ -27,7 +25,7 @@ export class VideoConverterWorker {
|
|||||||
const origPath = input.output.path;
|
const origPath = input.output.path;
|
||||||
input.output.path = origPath + '.part';
|
input.output.path = origPath + '.part';
|
||||||
await this._convert(input);
|
await this._convert(input);
|
||||||
await renamePr(input.output.path, origPath);
|
await fsp.rename(input.output.path, origPath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user