How to use the blob-util.revokeObjectURL function in blob-util

To help you get started, we’ve selected a few blob-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github morkro / happy-plants / src / utils / blob.js View on Github external
.catch(error => {
          blobUtil.revokeObjectURL(img.src)
          reject(error)
        })
    }
github processing / p5.js-web-editor / client / modules / IDE / actions / files.js View on Github external
export function getBlobUrl(file) {
  if (file.blobUrl) {
    blobUtil.revokeObjectURL(file.blobUrl);
  }

  const fileBlob = blobUtil.createBlob([file.content], { type: 'text/plain' });
  const blobURL = blobUtil.createObjectURL(fileBlob);
  return blobURL;
}