Loading repository data…
Loading repository data…
TerryZ / repository
A Vue2 plugin make files upload simple and easier, single file upload with image preview, multiple upload with drag and drop
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Explorer on
Single file upload with image preview
Multiple files upload with drag and drop
npm i v-uploader -S
Include and install plugin in your main.js file.
import Vue from 'vue'
import Uploader from 'v-uploader'
import { DialogAlert } from 'v-dialogs'
/**
* v-uploader plugin global config
*/
const uploaderConfig = {
uploadFileUrl: 'https://some-site/upload',
deleteFileUrl: 'https://some-site/delete',
showMessage: (vue, message) => {
// using v-dialogs to display error message
DialogAlert(message, { messageType: 'error' })
}
}
// Globally install plugin with options
Vue.use(Uploader, uploaderConfig)
Use v-dialogs plugin to display message for example