1

I understand XMLHttpRequest doesn't work with service worker (Chrome Extension manifest v3) so I need replacement of it for the following upload functionality. I am not sure how standard fetch how can be used for uploading with events like onreadystatechange and onprogress. Any example of fetch for upload purpose with events would be appreciated

var request = self.uploadXHR[index] = new XMLHttpRequest();
request.onreadystatechange = function () {
    
};

request.upload.onprogress = function (e) {
    
};

request.open('PUT', url, true);

request.send(blob);
Farukh Zahoor
  • 157
  • 12

0 Answers0