[Vuejs]-How to get File type object from url (image) in vuejs

3👍

One of the simple ways to do this is using fetch.

let url = '...'

fetch(url)
  .then(response => response.blob())
  .then(blob => {
    ...
  })

After you have blob you can convert it to file. See How to convert Blob to File in JavaScript.

Example

Leave a comment