Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload audio after recording #62

Open
aaarab opened this issue Dec 9, 2021 · 1 comment
Open

upload audio after recording #62

aaarab opened this issue Dec 9, 2021 · 1 comment

Comments

@aaarab
Copy link

aaarab commented Dec 9, 2021

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
Copy link

wikola commented Feb 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants