#A2Way MyS3 A Simple Storage Server.
Upload your files, set authentication credentials, and access your files from your apps through a HTTP API.
##How to Use
Send a HTTP
GET request to your MyS3 server with your file path.
If your file's path in server is
/dir/file.txt, send a
GET request to
hostname:port/dir/file.txt, and you'll get the content of your file. You can then store this content in your apps and use it.
If you provide a directory path to MyS3 (like
GET hostname:port/dir/), you'll get a JSON object with the file list of that directory. Ex:
[ [ "b3.png", "/dir/b3.png", false ], [ "file.txt", "/dir/file.txt", false ] ]
Level 2 objects of above 2D JSON object stands for files and directories in the given directory. Their third field will be
true for directories. Using that fields, you can identify sub-directories.
You must send your username and password as HTTP headers. The header field names are precisely
You will always get a
206 - Partial Content status code, unless you get a directory listing; then you'll get a
200 - OK status.
206 is always used because then MyS3 can even buffer large video files without first checking whether the file in question is a file that needs buffering or can be sent at once. Instead, MyS3 will buffer all files.
##How to Install
You must have Node.js and NPM installed on your computer for MyS3 to run.
- Download the ZIP file with latest version from https://github.com/a2way-com/mys3/archive/master.zip .
- Extract it to the directory where you wish MyS3 to be running.
- Navigate to that directory.
npm installfor the dependencies to be installed.
- Make a copy of
conf.json, open it and customize your authentication credentials, and port number for MyS3 to run on.
node index.js, and MyS3 will be up and running.
For quick testing, you can use a REST API testing tool like "Postman" and send requests to MyS3.