v-uploader

A Vue2 plugin to make files upload simple and easier, you can drag files or select file in dialog to upload.

Install

npm i v-uploader --save
Bash

Include plugin in your main.js file.

import Vue from 'vue'
import vUploader from 'v-uploader';

/**
 * v-uploader plugin global config
 */
const uploaderConfig = () => {
    return {
        uploadFileUrl: 'http://xxx/upload',
        deleteFileUrl: 'http://xxx/delete',
        showMessage: (vue, message) => {
            //using v-dialogs to show message
            vue.$vDialog.alert(message, null, {messageType: 'error'});
        }
    }
};

//install plugin with params
Vue.use(vUploader, uploaderConfig);
Js

there is using v-dialogs to show message in example

Plugin preview

single file upload mode

v-uploader-single

multiple files upload mode

v-uploader-multiple

GitHub

A Vue2 plugin make files upload simple and easier, single file upload with image preview, multiple upload with drag and dropRead More

Latest commit to the master branch on 6-29-2022
Download as zip