New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

upload-library

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

upload-library

Library for upload items

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Upload Library

N|Otiumtek

Build Status

Getting Started

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

Installation

Using npm:

$ npm install upload-library --save

Using yarn:

$ yarn add upload-library --save

Usage example

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

FAQs

Package last updated on 17 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts