Skip to content

Commit

Permalink
Merge pull request #3 from Sebelino/fix-max-file-size
Browse files Browse the repository at this point in the history
Increase max file size
  • Loading branch information
Sebelino authored Nov 24, 2022
2 parents 2f511cf + cfd1b2b commit bddf6e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rimraf = require('rimraf');
const glob = require('glob');
const server = require('http').createServer();

const PORT = 80;
const PORT = process.env.AAX_TO_MP3_PORT || 80;
const HOST = '0.0.0.0';
const TMP_DIR = '/tmp/aax2mp3/';

Expand Down Expand Up @@ -198,7 +198,10 @@ wss.on('connection', ws => {
});

app.post('/submit-form', (req, res) => {
new formidable.IncomingForm().parse(req)
const options = {
maxFileSize: 20 * 1024 * 1024 * 1024 // 20GB
}
new formidable.IncomingForm(options).parse(req)
.on('file', (name, file) => {
output(util.format('Uploaded file', name, file.name));
processFile(file);
Expand Down

0 comments on commit bddf6e0

Please sign in to comment.