JJ-uploader - Designed for single file update usage in your Vue App
jj-uploader
jj-uploader is designed for single file update usage in your Vue App.
Usage
-
install jj-uploader via npm
npm i jj-uploader
-
import it into your view
<script> import JjUploader from 'jj-uploader' export default { components:{ 'jj-uploader':JjUploader, }, } </script>
-
Use it
jj-uploader designed for simple single file upload usage.
Props Type Description url String the file upload url aka action in traditional from tag. timeout Number timeout in upload process, default is 0. Event Description success when file successfully updated, this event will be trigged. error when error occurred, this event will be trigged.
Sample Uasge
<jj-uploader :timeout="10000" url="http://localhost:8080/upload/" @error="errorOccured" @success="success"/>
methods:{
errorOccured(event){
console.log(event)
},
success(event){
console.log(event)
}
}