mumba-file-storage
TypeScript icon, indicating that this package has built-in type declarations

0.2.8 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i mumba-file-storage

Weekly Downloads

3

Version

0.2.8

License

Apache-2.0

Unpacked Size

40.1 kB

Total Files

19

Last publish

Collaborators

  • arvin.domingo
  • dennis.barbamumba
  • mumba.cloud
  • carl-oehme-mumba
  • kennbaker