0

As the title of the question, I'm trying to create a blob url to display some data uri images however I always get this error when the api return the data uri of the image

TypeError: Failed to execute 'createObjectURL' on 'URL': Overload

I'm using vue and this is the method I'm using to fetch the data uri images:

      axios.request({
        url: 'http://localhost:3000/platform/api/v1/img', 
        method: 'GET',
        headers: {
          'Authorization': `Bearer ${this.$store.getters.userToken}`,
        }
      }).then( (response) => {
        console.log(response);
        response.data.img_file.forEach( (item) => {
          console.log(item);
          if(item){
            let itemURL = URL.createObjectURL(item);
            this.payload.push(itemURL);
          }
        });
      });

How I can fix this, is there a solution?

newbiedev
  • 2,607
  • 3
  • 17
  • 65

0 Answers0