Create containers with slash

This commit is contained in:
Miguel González Aravena 2017-08-15 03:20:36 -03:00
parent e9a7c7e42f
commit 88a261e86d
2 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,8 @@ var fs = require('fs'),
stream = require('stream'),
async = require('async'),
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
@ -194,8 +195,8 @@ FileSystemProvider.prototype.upload = function(options, cb) {
);
}
var filePath = path.join(this.root, container, file);
var fileOpts = {flags: options.flags || 'w+',
var fileOpts = {
flags: options.flags || 'w+',
encoding: options.encoding || null,
mode: options.mode || parseInt('0666', 8),
};

View File

@ -52,7 +52,7 @@ exports.upload = function(provider, req, res, options, cb) {
}
if (!options.maxFileSize) {
options.maxFileSize = defaultOptions.maxFileSize;
options.maxFileSize = defaultOptions.maxFileSize || 10 * 1024 * 1024;
}
var form = new IncomingForm(options);