How to use the activestorage/src/blob_upload.BlobUpload function in activestorage

To help you get started, we’ve selected a few activestorage 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 chaskiq / chaskiq / app / javascript / src / shared / fileUploader.js View on Github external
export const directUpload = (url, headers, file) => {
  const upload = new BlobUpload({ file, directUploadData: { url, headers } });
  return new Promise((resolve, reject) => {
    upload.create(error => {
      if (error) {
        reject(error);
      } else {
        resolve();
      }
    })
  });
};

activestorage

Attach cloud and local files in Rails applications

MIT
Latest version published 2 years ago

Package Health Score

72 / 100
Full package analysis