We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fad3ae commit ce73a6eCopy full SHA for ce73a6e
src/ParseFile.js
@@ -102,13 +102,12 @@ export default class ParseFile {
102
var commaIndex = data.base64.indexOf(',');
103
try {
104
window.atob(commaIndex === -1?data.base64:data.base64.slice(commaIndex + 1));
105
- return true;
106
} catch(e) {
107
throw new TypeError('Cannot create a Parse.File with that data.');
108
}
109
110
if (commaIndex !== -1) {
111
- var matches = dataUriRegexp.slice(100).exec(data.base64);
+ var matches = dataUriRegexp.exec(data.base64.slice(0, 100));
112
// if data URI with type and charset, there will be 4 matches.
113
this._source = {
114
format: 'base64',
0 commit comments