Improve performance
This commit is contained in:
parent
253747ecfb
commit
93c0af613f
7 changed files with 12 additions and 8 deletions
|
@ -20,6 +20,7 @@ module.exports = (file, params, user) => new Promise(async (res, rej) => {
|
|||
return rej('file is required');
|
||||
}
|
||||
|
||||
// TODO: 非同期にしたい。Promise対応してないんだろうか...
|
||||
const buffer = fs.readFileSync(file.path);
|
||||
fs.unlink(file.path, (err) => { if (err) console.log(err); });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue