diff --git a/js/modules/types/attachment.js b/js/modules/types/attachment.js index 5f9d3c1d18..f32a21e308 100644 --- a/js/modules/types/attachment.js +++ b/js/modules/types/attachment.js @@ -1,7 +1,8 @@ /* eslint-env browser */ +const dataURLToBlob = require('blueimp-canvas-to-blob'); const MIME = require('./mime'); -const { arrayBufferToBlob, blobToArrayBuffer, dataURLToBlob } = require('blob-util'); +const { arrayBufferToBlob, blobToArrayBuffer } = require('blob-util'); const { autoOrientImage } = require('../auto_orient_image'); // Increment this everytime we change how attachments are processed. This allows us to diff --git a/package.json b/package.json index 2664a79e61..46a696be43 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ }, "dependencies": { "blob-util": "^1.3.0", + "blueimp-canvas-to-blob": "^3.14.0", "blueimp-load-image": "^2.18.0", "bunyan": "^1.8.12", "config": "^1.28.1", diff --git a/preload.js b/preload.js index dfee366dbd..0060ebd59a 100644 --- a/preload.js +++ b/preload.js @@ -60,7 +60,7 @@ window.nodeSetImmediate(function() {}); }, 1000); - window.dataURLToBlob = require('blob-util').dataURLToBlob; + window.dataURLToBlob = require('blueimp-canvas-to-blob'); window.loadImage = require('blueimp-load-image'); window.ProxyAgent = require('proxy-agent'); window.EmojiConvertor = require('emoji-js'); diff --git a/yarn.lock b/yarn.lock index 0018cb2b87..b4d5e145e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -468,6 +468,10 @@ bluebird@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" +blueimp-canvas-to-blob@^3.14.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/blueimp-canvas-to-blob/-/blueimp-canvas-to-blob-3.14.0.tgz#ea075ffbfb1436607b0c75e951fb1ceb3ca0288e" + blueimp-load-image@^2.18.0: version "2.18.0" resolved "https://registry.yarnpkg.com/blueimp-load-image/-/blueimp-load-image-2.18.0.tgz#03b93687eb382a7136cfbcbd4f0e936b6763fc0e"