Questions tagged [createobjecturl]
49 questions
0
votes
1 answer
image upload preview: window.URL.createObjectURL() only works once
I have an image uploader built from scratch in a React app. The image preview - made thanks to window.URL.createObjectURL() - only works the first time. I thought it was because of memory issue, so I added window.URL.revokeObjectURL() before each…

DoneDeal0
- 5,273
- 13
- 55
- 114
0
votes
1 answer
Blob type open more than one file type like pdf and jpeg
I want to preview a file in another browser tab by clicking on a file which I uploaded before.
It's working fine with {type:'application/pdf'} or {type: 'image/jpeg'} but I need both of them.
Is there a way to set more than one type for a Blob?
When…

melodi
- 1
- 2
0
votes
0 answers
In a Chrome Extension with Background and Content scripts when can I call revokeObjectURL?
I am uploading files from the local file system by using XMLHttpRequest. I am following the suggestion made in this SO question - Pass large blob or file from chrome extension
This is started in the background script with the following…

darbid
- 2,545
- 23
- 55
0
votes
1 answer
save data in localStorage when document is unloaded
I'm making a chrome extension.User can upload images to the extension.To save the data of images I am using window.URL.createObjectURL().The problem is that I want to save the data about images in localStorage and use it again. But Browsers release…

the_developer
- 747
- 2
- 7
- 17