trim filename

This commit is contained in:
syuilo 2018-10-12 04:01:45 +09:00
parent 908221287e
commit fc0a98cef0

View file

@ -31,7 +31,7 @@ async function job(file: IDriveFile): Promise<any> {
const minio = new Minio.Client(config.drive.config); const minio = new Minio.Client(config.drive.config);
const name = file.filename; const name = file.filename.substr(0, 50);
const keyDir = `${config.drive.prefix}/${uuid.v4()}`; const keyDir = `${config.drive.prefix}/${uuid.v4()}`;
const key = `${keyDir}/${name}`; const key = `${keyDir}/${name}`;
const thumbnailKeyDir = `${config.drive.prefix}/${uuid.v4()}`; const thumbnailKeyDir = `${config.drive.prefix}/${uuid.v4()}`;