Skip to main content
deleted 69 characters in body
Source Link
Allan Chua
  • 10.3k
  • 9
  • 45
  • 67

You have to convert the blob to object URL format first. You could use the code below mate:

const img = document.querySelector('#img'); const s3Url = https://s3.us-east-2.amazonaws.com/fakedomain.com/2021-12-23T21%14%05.888Z-blob; let blob = await fetch(s3Url).blob() let objectURL = URL.createObjectURL(myBlob); img.src = objectURL; 

You have to convert the blob to object URL format first. You could use the code below mate:

const img = document.querySelector('#img'); const s3Url = https://s3.us-east-2.amazonaws.com/fakedomain.com/2021-12-23T21%14%05.888Z-blob; let blob = await fetch(s3Url).blob() let objectURL = URL.createObjectURL(myBlob); img.src = objectURL; 

You have to convert the blob to object URL format first. You could use the code below mate:

const s3Url = https://s3.us-east-2.amazonaws.com/fakedomain.com/2021-12-23T21%14%05.888Z-blob; let blob = await fetch(s3Url).blob() let objectURL = URL.createObjectURL(myBlob); 
Source Link
Allan Chua
  • 10.3k
  • 9
  • 45
  • 67

You have to convert the blob to object URL format first. You could use the code below mate:

const img = document.querySelector('#img'); const s3Url = https://s3.us-east-2.amazonaws.com/fakedomain.com/2021-12-23T21%14%05.888Z-blob; let blob = await fetch(s3Url).blob() let objectURL = URL.createObjectURL(myBlob); img.src = objectURL;