Skip to content

Commit

Permalink
update dependacies
Browse files Browse the repository at this point in the history
  • Loading branch information
IrosTheBeggar committed Jan 31, 2022
1 parent b4aa11a commit 7f4f528
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"build": {
"appId": "io.mstream.server",
"productName": "mStream Server",
"electronVersion": "15.0.0",
"electronVersion": "16.0.7",
"asar": false,
"files": [
"**/*",
Expand Down Expand Up @@ -90,29 +90,29 @@
},
"dependencies": {
"archiver": "^5.3.0",
"axios": "^0.21.4",
"busboy": "^0.3.1",
"axios": "^0.25.0",
"busboy": "^1.4.0",
"commander": "^6.2.1",
"cookie-parser": "^1.4.5",
"electron-updater": "^4.3.9",
"cookie-parser": "^1.4.6",
"electron-updater": "^4.6.1",
"escape-string-regexp": "^4.0.0",
"express": "^4.17.1",
"express": "^4.17.2",
"fast-xml-parser": "^3.20.0",
"ffbinaries": "^1.1.4",
"fluent-ffmpeg": "^2.1.2",
"http-proxy": "^1.18.1",
"joi": "^17.4.2",
"joi": "^17.6.0",
"jsonwebtoken": "^8.5.1",
"lokijs": "^1.5.12",
"m3u8-parser": "^4.7.0",
"make-dir": "^3.1.0",
"mime-types": "^2.1.32",
"music-metadata": "^7.11.4",
"nanoid": "^3.1.25",
"mime-types": "^2.1.34",
"music-metadata": "^7.11.7",
"nanoid": "^3.2.0",
"tree-kill": "^1.2.2",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.5.5",
"ws": "^7.4.6"
"winston": "^3.5.0",
"winston-daily-rotate-file": "^4.6.0",
"ws": "^8.4.2"
},
"devDependencies": {
"electron-builder": "22.11.7"
Expand Down
11 changes: 6 additions & 5 deletions src/api/file-explorer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');
const fs = require('fs').promises;
const fsOld = require('fs');
const Busboy = require("busboy");
const busboy = require("busboy");
const Joi = require('joi');
const mkdirp = require('make-dir');
const winston = require('winston');
Expand Down Expand Up @@ -106,15 +106,16 @@ exports.setup = (mstream) => {
const pathInfo = vpath.getVPathInfo(decodeURI(req.headers['data-location']), req.user);
mkdirp.sync(pathInfo.fullPath);

const busboy = new Busboy({ headers: req.headers });
busboy.on('file', (fieldname, file, filename, encoding, mimetype) => {
const bb = busboy({ headers: req.headers });
bb.on('file', (fieldname, file, info) => {
const { filename } = info;
const saveTo = path.join(pathInfo.fullPath, filename);
winston.info(`Uploading from ${req.user.username} to: ${saveTo}`);
file.pipe(fsOld.createWriteStream(saveTo));
});

busboy.on('finish', () => { res.json({}); });
req.pipe(busboy);
bb.on('close', () => { res.json({}); });
req.pipe(bb);
});

mstream.post("/api/v1/file-explorer/m3u", async (req, res) => {
Expand Down

0 comments on commit 7f4f528

Please sign in to comment.