# @augmt/file-metadata-microservice

> File Metadata Microservice

Latest version **0.3.0** (published 2017-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @augmt/file-metadata-microservice
pnpm add @augmt/file-metadata-microservice
yarn add @augmt/file-metadata-microservice
bun add @augmt/file-metadata-microservice
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2017-08-27 |
| First published | 2016-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hector Garcia |
| Maintainers | augmt |

## Links

- npm: https://www.npmjs.com/package/@augmt/file-metadata-microservice
- Repository: https://github.com/augmt/file-metadata-microservice
- Homepage: https://github.com/augmt/file-metadata-microservice#readme
- Issues: https://github.com/augmt/file-metadata-microservice/issues
- npm.io page: https://npm.io/package/@augmt/file-metadata-microservice

## Dependencies (3)

- [koa](https://npm.io/package/koa.md) 2.3.0
- [koa-body](https://npm.io/package/koa-body.md) 2.3.0
- [koa-router](https://npm.io/package/koa-router.md) 7.2.1

## Recent versions

- 0.3.0 (latest) — 2017-08-27
- 0.2.6 — 2016-10-09
- 0.2.4 — 2016-10-02

## README

# File Metadata Microservice

Get the size of a file in bytes.

## How it Works

This microservice uses [koa-body][1] to parse binary data and [Koa][2] and
[koa-router][3] to serve requests.

[1]: https://github.com/dlau/koa-body
[2]: http://koajs.com/
[3]: https://github.com/alexmingoia/koa-router

## How to Use

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

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

[4]: http://koajs.com/#app-listen-
[5]: https://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback

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

---
_Source: https://npm.io/package/@augmt/file-metadata-microservice · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
