Reformat code
This commit is contained in:
parent
5db8da8c23
commit
70f5d6dc35
|
@ -38,7 +38,6 @@ rs.getContainers(function (err, containers) {
|
||||||
client.removeFile(container, file, function (err) { });
|
client.removeFile(container, file, function (err) { });
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
var s3 = StorageService({
|
var s3 = StorageService({
|
||||||
provider: 'amazon',
|
provider: 'amazon',
|
||||||
key: 'your-amazon-key',
|
key: 'your-amazon-key',
|
||||||
|
@ -60,13 +59,11 @@ s3.getContainers(function (err, containers) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var stream = s3.uploadStream('con1', 'test.jpg');
|
var stream = s3.uploadStream('con1', 'test.jpg');
|
||||||
var input = fs.createReadStream(path.join(__dirname, 'test.jpg')).pipe(stream);
|
var input = fs.createReadStream(path.join(__dirname, 'test.jpg')).pipe(stream);
|
||||||
|
|
||||||
|
|
||||||
var local = StorageService({
|
var local = StorageService({
|
||||||
provider: 'filesystem',
|
provider: 'filesystem',
|
||||||
root: path.join(__dirname, 'storage')
|
root: path.join(__dirname, 'storage')
|
||||||
|
|
|
@ -11,7 +11,8 @@ exports.initialize = function (dataSource, callback) {
|
||||||
dataSource.connector = connector;
|
dataSource.connector = connector;
|
||||||
dataSource.connector.dataSource = dataSource;
|
dataSource.connector.dataSource = dataSource;
|
||||||
|
|
||||||
connector.DataAccessObject = function() {};
|
connector.DataAccessObject = function () {
|
||||||
|
};
|
||||||
for (var m in StorageService.prototype) {
|
for (var m in StorageService.prototype) {
|
||||||
var method = StorageService.prototype[m];
|
var method = StorageService.prototype[m];
|
||||||
if ('function' === typeof method) {
|
if ('function' === typeof method) {
|
||||||
|
@ -22,5 +23,6 @@ exports.initialize = function (dataSource, callback) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
connector.define = function(model, properties, settings) {};
|
connector.define = function (model, properties, settings) {
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue