Create containers with slash
This commit is contained in:
parent
e9a7c7e42f
commit
88a261e86d
|
@ -16,7 +16,8 @@ var fs = require('fs'),
|
||||||
stream = require('stream'),
|
stream = require('stream'),
|
||||||
async = require('async'),
|
async = require('async'),
|
||||||
File = require('./file').File,
|
File = require('./file').File,
|
||||||
Container = require('./container').Container;
|
Container = require('./container').Container,
|
||||||
|
mkdirp = require('mkdirp');
|
||||||
|
|
||||||
module.exports.storage = module.exports; // To make it consistent with pkgcloud
|
module.exports.storage = module.exports; // To make it consistent with pkgcloud
|
||||||
|
|
||||||
|
@ -194,8 +195,8 @@ FileSystemProvider.prototype.upload = function(options, cb) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
var filePath = path.join(this.root, container, file);
|
var filePath = path.join(this.root, container, file);
|
||||||
|
var fileOpts = {
|
||||||
var fileOpts = {flags: options.flags || 'w+',
|
flags: options.flags || 'w+',
|
||||||
encoding: options.encoding || null,
|
encoding: options.encoding || null,
|
||||||
mode: options.mode || parseInt('0666', 8),
|
mode: options.mode || parseInt('0666', 8),
|
||||||
};
|
};
|
||||||
|
|
|
@ -52,7 +52,7 @@ exports.upload = function(provider, req, res, options, cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.maxFileSize) {
|
if (!options.maxFileSize) {
|
||||||
options.maxFileSize = defaultOptions.maxFileSize;
|
options.maxFileSize = defaultOptions.maxFileSize || 10 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
var form = new IncomingForm(options);
|
var form = new IncomingForm(options);
|
||||||
|
|
Loading…
Reference in New Issue