0.0.3 • Published 7 years ago

dumb_img v0.0.3

Weekly downloads
-
License
GPL-3.0
Repository
gitlab
Last release
7 years ago

DumbImg Client

A dumb lib to interact with this dumb image storing server.

Example

import Client from './client';
// Only for dev, the lib will only be client.js

const cli = new Client('http://localhost:7654');

console.log(cli);

document.querySelector('#upload_test')
    .addEventListener('submit', ev => {
        ev.preventDefault();
        const form = ev.target;
        const file = form.querySelector('#file').files[0];

        cli.upload(file)
            .then(res => console.log(res))
            .catch(
                err => console.error(err)
            );
    });
0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago