# upload-library

> Library for upload items

Latest version **0.0.2** (published 2020-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install upload-library
pnpm add upload-library
yarn add upload-library
bun add upload-library
```

## 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.0.2 |
| Published | 2020-12-17 |
| First published | 2020-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.0.0 |
| Dependencies | 1 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Yaniel Blanco |
| Maintainers | yblancof |

## Links

- npm: https://www.npmjs.com/package/upload-library
- npm.io page: https://npm.io/package/upload-library

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.3.3

## Recent versions

- 0.0.2 (latest) — 2020-12-17
- 0.0.1 — 2020-12-16

## README

# Upload Library

[![N|Otiumtek](https://cldup.com/dTxpPi9lDf.thumb.png)](https://nodesource.com/products/nsolid)

[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)

### Getting Started

Upload-library is a vue component that allows you to upload images to a web server.

### Installation
Using npm:

```sh
$ npm install upload-library --save
```
Using yarn:
```sh
$ yarn add upload-library --save
```

### Usage example

```vue
<template>
  <div id="app">
    <uploader-image 
      v-bind:loading="loading"
      v-bind:files="files"
      v-bind:callbackUpload="upload"
      v-bind:callbackDelete="remove"
    />
  </div>
</template>

<script>
import UploaderImage from 'upload-library'

export default {
  name: 'app',
  data(){
    return {
      files: [],
      loading: false,
    };
  },
  methods: {
    upload: async function(data){
      this.loading = true;
      setTimeout(() => {
        this.files = this.files.concat([
          {id: 1, url:"//s.fenicio.app/f2/tex/productos/1-sublimable_460x460_1537557205_cca.jpg"},
          {id: 2, url:"//s.fenicio.app/f2/tex/productos/1-sublimable_460x460_1537557205_cca.jpg"}
        ]);
        this.loading = false;
      }, 3000)   
    },
    remove: async function(id){
      this.files = this.files.filter(item => item.id != id);
    }
  },
  components: {
    UploaderImage
  }
}
</script>

<style>
#app {
  margin-top: 60px;
  margin: 0 auto;
  width: 100%;
  padding-top: 30px;
}
</style>
```

---
_Source: https://npm.io/package/upload-library · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
