facebookarchive/draft-js

File size is different after using handlePastedFiles

Open

#1685 aperta il 9 mar 2018

Vedi su GitHub
 (0 commenti) (5 reazioni) (0 assegnatari)JavaScript (2646 fork)batch import
bughelp wanted

Metriche repository

Star
 (22.554 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

bug*

What is the current behavior? The size of the file it is much bigger than original after passing it with the handlePastedFiles prop function

Ex: before size is 3.6 MB, after size is 25(+something) MB

JSFiddle working example https://jsfiddle.net/m6z0xn4r/530/

What is the expected behavior? To return the exact same file.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

DraftJs - 0.10.4 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36

Extra info The size of the files is decreased in Firefox, its as it is in Safari and in Chrome and Opera it increases a lot.

The left side is after passing the file through handlePastedFiles and downloading and one on the left is the original.

screen shot 2018-03-09 at 12 17 59 pm

Guida contributor