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