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

126
Views
Vuejs boostrap.js and axios

I don't know how this laravel-echo code and axios on cloudinary have relationship ? but when I uncomment this code in boostrap.js file => axios on cloudinary got error Error: Network Error at createError (app.js :14404) at XMLHttpRequest.handleError (app.js:13851)

boostrap.js: (If you comment this code, the axios below works properly)

import Echo from 'laravel-echo';
window.Pusher = require('pusher-js');
window.Echo = new Echo({
    broadcaster: 'pusher',
    key: process.env.MIX_PUSHER_APP_KEY,
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    forceTLS: true
});

axios up image to cloudinary => Error Network

upload: function() {
    let reader = new FileReader();
    reader.addEventListener("load", function() {
        this.fileContents = reader.result;
        this.prepareFormData();
        let cloudinaryUploadURL = `https://api.cloudinary.com/v1_1/dm9r6ilqz/upload`;
        let requestObj = {
            url: cloudinaryUploadURL,
            method: "POST",
            data: this.formData,
        };

        axios(requestObj)
        .then(response => {
            this.results = response.data;
            this.message = this.message + `<img src="${this.results.url}"/>` 
        })
        .catch(error => {
            this.errors.push(error);
            console.log(error);
        })
        .finally(() => { });
        }.bind(this),
        false
    );
    if (this.file && this.file.name) {
        reader.readAsDataURL(this.file);
    }
},

How can I keep the code in boostrap.js without error when axios ?

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!