We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6afc133 commit c914b33Copy full SHA for c914b33
lib/application/filesharing/filesharing.js
@@ -6,8 +6,9 @@ var formidable = require('formidable');
6
var handleUpload = function(request, response, inform) {
7
var form = new formidable.IncomingForm();
8
form.parse(request, function(error, fields, files) {
9
- fs.rename(files.file.path, '/tmp/bivouac_upload_' + files.file.name, function(err) {
10
- inform(files.file.name, files.file.type);
+ var filename = files.file.name.replace(/ /g, '_');
+ fs.rename(files.file.path, '/tmp/bivouac_upload_' + filename, function(err) {
11
+ inform(filename, files.file.type);
12
response.writeHead(200, {'content-type': 'text/plain'});
13
response.end(JSON.stringify('ok'));
14
});
0 commit comments