0.2.8 • Published 7 years ago

mumba-file-storage v0.2.8

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
7 years ago

Mumba File Storage

Interfaces for dealing with files.

Installation

$ npm install --save mumba-file-storage

S3 Example

import {S3FileStorageService} from `mumba-file-storage`;
import {S3} from 'aws-sdk';

let tmpDir = __dirname + '/tmp';
let options = {
	Bucket: 'the-bucket',
	tmpDir: tmpDir
};

let s3Options = {
	tmpDir: tmpDir,
	accessKeyId: '',
	secretAccessKey: '',
	Bucket: 'the-bucket',
	ACL: 'private',
	ServerSideEncryption: 'AES256'
};

let awsS3 = new S3(s3Options);

let instance = new S3FileStorageService(options, awsS3);

instance.getFile('/path/to/object');

instance.putFile(`${tmpDir}/file`, '/path/to/object');

instance.moveFile('/path/to/original/file', '/path/to/new/location');

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test

People

The original author of Mumba File Storage is Scott Robinson.

List of all contributors

License

Apache 2.0


© 2016 Mumba Pty Ltd. All rights reserved.

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.3

8 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago