FIX: Uploads were broken in old Safari (#15391)

Blob.prototype.arrayBuffer is Safari 14 onwards, so we can check to see if this exists and just skip the checksumming if not.
This commit is contained in:
Rafael dos Santos Silva 2021-12-22 19:16:51 -03:00 committed by GitHub
parent abb57c350d
commit 435562cc70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,12 @@ export default class UppyChecksum extends UploadPreProcessorPlugin {
);
return false;
}
if (!Blob.prototype.arrayBuffer) {
this._consoleWarn(
"The required File API is unavailable in this browser."
);
return false;
}
if (!this._hasCryptoCipher()) {
this._consoleWarn(
"The required cipher suite is unavailable in this browser."