Magic upload image base on Vue.js Support paste and drag-drop

magic-upload-image

Image upload component that simulates Github issues based on Vue.js 1.0

Support image upload

  • Screenshot paste upload
  • Drag and drop upload
  • Select Image

Demo site: demo

demo

Method to realize

Browser

  • Screenshot upload using adhesive pasteevents, support browsers: caniuse Paste
  • Drag and drop to upload drop dragevents
  • Select a picture from a form changeevent

Server node

  • dev-upload.jsBased expressupload service developers to write with pictures, images stored locally, start-up modenpm run dev
  • koa-es6-server.jsBased on the picture upload service written by koa es6 , the picture is saved locally, the startup methodnpm run koa
  • lean-server.jsBased on expresswritten leancloud the Node server, upload the pictures stored in leancloud leancloud-code documentation

Development

# install dependencies
npm install

# serve with hot reload at localhost:3002
npm run dev

# build for production with minification
npm run build

# run koa server
npm run koa

Publish to leancloud

# Installation lean tools 
npm install -g leancloud-code

npm RUN Build

lean the Add < App >  < App-the above mentioned id > 

# released a beta 
lean Deploy # issued a formal 
lean publish

Download Details:

Author: xiaokaike

Live Demo: http://upload.leanapp.cn/

GitHub: https://github.com/xiaokaike/magic-upload-image

#vuejs #vue #javascript #vue-js

Magic upload image base on Vue.js Support paste and drag-drop
14.60 GEEK