0.3.0 • Published 7 years ago

@augmt/file-metadata-microservice v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

File Metadata Microservice

Get the size of a file in bytes.

How it Works

This microservice uses koa-body to parse binary data and Koa and koa-router to serve requests.

How to Use

app.js exports a Koa app. Koa apps have an app.listen() method that is identical to Node's http.Server.listen().

Import app.js and call app.listen() to start up the microservice.

API Resources

POST /

Returns an object containing the data's size in bytes.

REQUEST

Sample: https://file-metadata-microservice.example.com/

Content-Type: multipart/form-data

Request:

------WebKitFormBoundary7fkjhx85BAWpokZH
Content-Disposition: form-data; name="file"; filename="blob"
Content-Type: text/plain


------WebKitFormBoundary7fkjhx85BAWpokZH--

RESPONSE

Status: 200 - application/json

Response:

{
  "filesize": 1149
}
0.3.0

7 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago