Skip to content
Permalink
Browse files Browse the repository at this point in the history
Make sure temp file is closed (and thus deleted)
  • Loading branch information
JC5 committed Oct 1, 2021
1 parent 3f1ec6a commit a85b642
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Helpers/Attachments/AttachmentHelper.php
Expand Up @@ -171,6 +171,7 @@ public function saveAttachmentFromApi(Attachment $attachment, string $content):
$allowedMime = config('firefly.allowedMimes');
if (!in_array($mime, $allowedMime, true)) {
Log::error(sprintf('Mime type %s is not allowed for API file upload.', $mime));
fclose($resource);

return false;
}
Expand Down

0 comments on commit a85b642

Please sign in to comment.