@tityus/vue-uploader

Vue uploader component.
278
Install
npm install @tityus/vue-uploader
Latest Version:0.5.1
Vue:2
License:MIT
Last Updated:Aug 3, 2021
Links: GitHub  ·  npm
Maintainer: tityus

vue-uploader

GitHub last commit GitHub issues GitHub

Upload async component for Vue and compatible with Vuetify.

Install

Using NPM
npm install @tityus/vue-uploader
Import
import VueUploader from '@tityus/vue-uploader';
In your component
<script>
var app = new Vue({
  el: '#app',
  data: {},
  component: {
    VueUploader
  }
})
</script>
In your template
<vue-uploader></vue-uploader>

Configuration (props)

accept : [String, default : ''] : Specifies what file types the user can pick.

target : [String, default : ''] : Target of your API/Backend

selected : [Boolean, default: false] : Show selected file

vuetify : [Boolean, default: false] : Transform to vuetify button.

Vuetify props

dark, flat, fab, large, outline : [Boolean, default: false] : See more on Vuetify.

icon : [String, default: ''] : Add icon to button.

Get response from API

You can get response from your API.

App component (Template)
<vue-uploader @uploadResponse="getResponse"></vue-uploader>

You can get file selected

<vue-uploader @uploadFile="getFile"></vue-uploader>
App component (Script)
<script>
  methods: {
    getResponse(value) {
      console.log(value);
    }
  }
</script>

Example template

<vue-uploader
  accept="image/*"
  vuetify
  target="/api/upload"
  @uploadResponse="getResponse()" // get data from component
  @uploadFile="getFile()"
  vuetify
  outline
  color="indigo"
  large
  icon="cloud_upload" // Material Icon
>
  Select a file // You can change slot's message
</vue-uploader>

Contribution

For contribute, you can help by submitting an issue or a pull request.

License

MIT

Related Packages

@kingscode/vuetify-upload

a vuetify multi file upload with deletions and file previews

752 5
vuetify-upload-button

A Vue.js component for showing a Vuetify input/button for file uploading.

33,596 86
v-snackbars

Display the v-snackbar (from Vuetify) with a stack display

92,647 110
@nextgis/vuetify-notice

component to display quick message and dialog to a user

1,621 0
@web-types/vuetify

Web-types for vuetify

93,870 306

Version History

Version Released Vue License
0.5.1 ^2.6.10 MIT
0.5.0 ^2.6.10 MIT
0.3.2 ^2.6.10 MIT
0.3.1 ^2.6.10 MIT
0.3.0 ^2.6.10 MIT