0.3.5 • Published 7 years ago
Up2Bucket v0.3.5
Up2Bucket S3 client for Image upload
a Sails application
Installation
- For Ubuntu 16.04 or gretter
NodeJS (v4.2.6) Installation
$ sudo apt-get install nodejs-legacy
SailsJs Installation (0.12.4)
$ sudo npm -g install sails
Tests Setup
On project directory
$ sudo npm install -g grunt-cli
$ npm install grunt-mocha-istanbul --save-dev
$ npm install supertest --save-dev
$ sudo npm install should --save-dev
$ sudo npm install mocha --save-dev
ImageMagick Critical Setup
$ sudo nano /etc/ImageMagick-6/policy.xml
- Comment the line:
<policy domain="coder" rights="none" pattern="HTTPS" />
Running
$ npm install
$ sails lift
Usage
This service provides a RESTful interface to upload files to Amazon S3 AWS services.
Setting your Bucket
To upload files to your bucket, you may create a file called "s3.js" into <root>/config/
folder.
This files may contains the follow configurations:
module.exports.s3 = {
key: AWS_ACCESS_KEY,
secret: AWS_ACCESS_SECRET,
bucket: S3_BUCKET_NAME,
region: S3_BUCKET_REGION
}
Sending some file
To send a file, i need make a "POST" request to "/v1/file" with a image field, with a binary file attached.
Testing
$ npm install
$ npm test
Contribute
You can contribute submitting a PR to this repository. Please carefully read our contribution guide and check the master branch build status before submitting a pull request with code changes.
Version
Api Version: 0.3.0