vuetify-vuejs-firebaseuploader
v0.0.25
Published
A dead simple Vue.js component to upload file to Firebase Storage
Downloads
11
Readme
vuetify-vuejs-firebaseUploader
A dead simple VueJS component to upload file in Firebase Storage
Installation
npm install vuetify-vuejs-firebaseuploader --save
Todo
- Remove confirmation.
- Support drag and drop.
Usage
<template>
<v-container grid-list-md>
<v-layout row wrap>
<firebaseUploader
path="YOUR/FOLDER/"
:storage="getStorage()"
targetFileName="image.png"
uploadFileLabel="Upload a file"
deleteFileLabel="Delete the file"
unsuportedMediaTypeLabel="Invalide file format"
:limitToType="['image/png']"
:previewMediaContain="false"
responsiveGrid="sm12"
@onFileUpload="onUpload"
@onFileDelete="onDelete"
@onFileUploadError="onUploadError"
/>
</v-layout>
</v-container>
</template>
<script>
import Vue from 'vue';
import firebaseUploader from 'vuetify-vuejs-firebaseuploader';
Vue.use(firebaseUploader);
export default {
name: 'event',
getStorage: function(){
return firebase.storage();
},
onUpload: function(path){
console.log(path);
},
onDelete: function(path){
console.log(path);
}
}
</script>