Skip to content

Commit

Permalink
Update Appwrite.php
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed May 16, 2024
1 parent 9ce0314 commit 97c53be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Migration/Destinations/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,13 +499,13 @@ public function importFile(File $file): File
);

if ($file->getEnd() == ($file->getSize() - 1)) {
$file->setStatus(Resource::STATUS_SUCCESS);

// Signatures for Encrypted files are invalid, so we skip the check
if ($file->getBucket()->getEncryption() == false || $file->getSize() > (20 * 1024 * 1024)) {
if ($response['signature'] !== $file->getSignature()) {
$file->setStatus(Resource::STATUS_WARNING, 'File signature mismatch, Possibly corrupted.');
}
} else {
$file->setStatus(Resource::STATUS_SUCCESS);
}
}

Expand Down

0 comments on commit 97c53be

Please sign in to comment.