Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diegocouto/authenticity
A lightweight application to guarantee files authenticity.
https://github.com/diegocouto/authenticity
Last synced: about 1 month ago
JSON representation
A lightweight application to guarantee files authenticity.
- Host: GitHub
- URL: https://github.com/diegocouto/authenticity
- Owner: diegocouto
- Created: 2015-08-19T21:55:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-28T20:34:06.000Z (about 9 years ago)
- Last Synced: 2023-03-02T22:33:17.009Z (almost 2 years ago)
- Language: JavaScript
- Size: 1.54 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authenticity [![Build Status](https://travis-ci.org/diegocouto/authenticity.svg?branch=master)](https://travis-ci.org/diegocouto/authenticity)
A lightweight application to guarantee files authenticity.
![homepage](https://cloud.githubusercontent.com/assets/1069623/9945615/ae2332b2-5d64-11e5-8f15-aaedf52eb517.png)
It acts like a central repository of files, which can be uploaded only from valid sources through its API and are available publicly when the correct file key is used.
[Follow me on Twitter](https://twitter.com/diegocouto).
## Getting Started
Before installing, it's recommended that you be sure that you have at least Node.js v0.12.
### Install
1. Clone this repo into your local environment.
2. Run `npm install` from the app directory.
3. To execute the tests, run `make test`.
4. `node bin/www`### Configurations
Default options (**config/default.json**):
```json
{
"File": {
"multer": {
"dest": "uploads/",
"limits": {
"fileSize": 10485760
}
},
"types": ["application/pdf", "image/jpeg", "image/png", "image/tiff"]
}
}
```### API Usage
**Creating a new file**
POST: `/api/v1/files`
| Parameters | Type | Required |
| ---------- | :----: | :------: |
| token_key | string | true |
| file_key | string | true |
| file | file | true |
| description| text | false |**Requesting file info**
GET: `/api/v1/files/:file_key`
```json
{
"id": 1,
"description": null,
"key": "file_key",
"path": "path/to/the/file.pdf",
"md5Digest": "0acda6a8d205ba80edfc8e8d92044aba",
"sha1Digest": "e292f0b08df083e13c444f43c5d4efa0a3ad1712",
"createdAt": "2015-09-16T20:24:01.366Z",
"updatedAt": "2015-09-16T20:24:01.366Z"
}
```## License
Authenticity is [MIT licensed](https://opensource.org/licenses/MIT). Enjoy!