Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

375
Views
How to export blob url from js file to vue file in nuxt.js?

I want to import a blob url generated by an external js file in nuxt.js into a vue file.

recorder.js

this.chunks.push(evt.data)
this.chunkType = evt.data.type

if (this.state !== 'inactive') {
  return
}

let blob = new Blob(this.chunks, { 'type': this.chunkType })
let blobUrl = URL.createObjectURL(blob)
const recording = {
  ts: new Date().getTime(),
  blobUrl: blobUrl,
  mimeType: blob.type,
  size: blob.size,
}
console.log(blobUrl);`

I would like to convert the blob url generated by this code into a blob file in the vue page.

recorder.vue

<h4 class="mt-16 mb-10 ml-6">record file</h4>

      <div v-for="(recording, idx) in recordings" :key="recording.ts">

        <v-card class="mb-14" max-width="450">
          <v-card-title primary-title>
            <v-layout justify-center>
              <div class="ml-3">
                <v-card-title class="mb-3"
                  >file #{{ idx + 1 }}
                </v-card-title>

                <audio
                  id="recordFile"
                  :src="recording.blobUrl"
                  controls="true"
                />

script

 submitFile(_idx) {
  axios
    .get(blobUrl, {
      responseType: 'blob',
    })
    .then(({ data }) => {
      console.log(data) // → Blob
    })
    .catch((err) => {
      console.error(err)
    })

I was able to turn the blob url into a blob file and output it to the console log using the above method inside the external file recorder.js. However, I don't know how to export this blob url to a vue page.

recorder.js

export default class RecorderService {
constructor (baseUrl) {
this.baseUrl = baseUrl

I would like to output from export default class like this.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!