Skip to content
MyS3. A Simple Storage Server.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
store
.gitignore
README.md
VERSION
conf.json.example
index.js
package.json
tsd.json
typings.d.ts

README.md

#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.

###HTTP Requests

You must send your username and password as HTTP headers. The header field names are precisely username and password.

###HTTP Responses

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

###Prerequisites

You must have Node.js and NPM installed on your computer for MyS3 to run.

###Installing Process

  1. Download the ZIP file with latest version from https://github.com/a2way-com/mys3/archive/master.zip .
  2. Extract it to the directory where you wish MyS3 to be running.
  3. Navigate to that directory.
  4. Run npm install for the dependencies to be installed.
  5. Make a copy of conf.json.example as conf.json, open it and customize your authentication credentials, and port number for MyS3 to run on.
  6. Run node index.js, and MyS3 will be up and running.

###Testing

For quick testing, you can use a REST API testing tool like "Postman" and send requests to MyS3.

You can’t perform that action at this time.