This commit is contained in:
Danny Coates
2017-07-12 10:53:29 -07:00
parent ee8ff3d220
commit b32e63c305
7 changed files with 133 additions and 112 deletions

View File

@@ -129,7 +129,9 @@ function localGet(id) {
function localSet(newId, file, filename, meta) {
return new Promise((resolve, reject) => {
const fstream = fs.createWriteStream(path.join(__dirname, '../static', newId));
const fstream = fs.createWriteStream(
path.join(__dirname, '../static', newId)
);
file.pipe(fstream);
fstream.on('close', () => {
redis_client.hmset(newId, meta);