grishkovelli / vue-audio-recorder

A simple audio recorder for VueJS applications
MIT License
498 stars 157 forks source link

upload audio after recording #62

Open aaarab opened 2 years ago

aaarab commented 2 years ago

Hello, thank you for this awesome plugin. in my case after recording, i try to save audio on my server-side (laravel), <audio-recorder upload-url="/api/upload" :attempts="3" :time="2" :before-recording="callback" :after-recording="callback" :before-upload="callback" :successful-upload="callback" :failed-upload="callback" :select-record= "selectRecord" /> But i just get an error on the console Error in v-on handler: "TypeError: Cannot read properties of undefined (reading 'post')" found in ---> at src/components/uploader.vue

at src/components/recorder.vue at resources/js/components/SingleEquibmentComponent.vue at resources/js/Index.vue please can someone help Thank you.
wikola commented 1 year ago

It use this.$axios.post(this.uploadUrl, data, { headers: headers }) to upload audio. You need to extend vue with axios or map global properties and define post method