From 33860d93f3d30ec55c32f3f4a58729df2eb43f0d Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Tue, 13 Feb 2018 11:13:02 -0500 Subject: [PATCH] Revert "Replace `blueimp-canvas-to-blob` with `blob-util`" This reverts commit 31b3e853e4afc78fe80995921aa4152d9f6e4783. --- js/modules/types/attachment.js | 3 ++- package.json | 1 + preload.js | 2 +- yarn.lock | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/js/modules/types/attachment.js b/js/modules/types/attachment.js index 5f9d3c1d1..f32a21e30 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 2664a79e6..46a696be4 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 dfee366db..0060ebd59 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 0018cb2b8..b4d5e145e 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"