vue-simple-upload-component

1.0.3 • Public • Published

Vue Upload Component npm npm npm GitHub stars

A simple upload component for Vue.js 2.x

Instalation

npm install vue-simple-upload-component --save-dev

Usage example

<template>
  <div>
   <upload-file @changed-files="uploadAction($event)"></upload-file>
  </div>
</template>
 
<script>
import UploadFile from 'vue-simple-upload-component'
export default {
    name: "MyComponent",
    components: {
        UploadFile
    }
}
</script>

Props

Properties Description
message Default: Choose a file...
Required: false
It's used to indicate the upload zone.
dragOverMessage Default: Drag it here
Required: false
Used when dragover event is dispatched
uploadedMessage Default: empty
Required: false
Used to show a message when upload a file
showButton Default: false
Required: false
Show send button.
buttonTitle Default: Send
Required: false
Send button title/value
cancelButton Default: Cancel
Required: false
File cancel button
itemIndex Default: 0
Required: false
Component index for multiples upload components
isDragDrop Default: false
Required: false
Enable/Disable Drag&Drop.
acceptedFormats Default: []
Required: false
Accepted MIME Types.

Events

Event Description
send-file Called if drag&drop is inactive and user pressed the 'Send' button
changed-files When files list's changed, added or removed a file.
selected-file When a file is added (REMOVED)
remove-file Called when the actual file is removed (REMOVED)

Change Log

v1.0.0

Added support to multiple files Changed 'add' and 'remove' file methods.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.32latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.32
1.0.20
1.0.10
1.0.00
0.5.50
0.5.430
0.5.420
0.5.410
0.5.40
0.5.30
0.5.290
0.5.280
0.5.270
0.5.260
0.5.250
0.5.240
0.5.230
0.5.220
0.5.210
0.5.20
0.5.10
0.5.00
0.1.40
0.1.340
0.1.330
0.1.320
0.1.310
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i vue-simple-upload-component

Weekly Downloads

2

Version

1.0.3

License

MIT

Last publish

Collaborators

  • cezaralexandre