Skip to content

Commit

Permalink
Update Files.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisnikoy committed Apr 24, 2024
1 parent 212b804 commit 0da2f34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public static function getFileFromBucket(?string $bucket, string $fileId, ?int $

$filePath = $config->get('storage_dir') . '/' . $row->id . '.' . $extension;

if(!file_exists($filePath)) {
$filePath = $config->get('tmp_storage_dir') . '/' . $row->id . '.' . $extension;
}

if(file_exists($filePath)) {
header('Content-Type: ' . $row->mime_type);
if(Image::isImage($filePath) && (isset($width) || isset($height))) {
Expand Down

0 comments on commit 0da2f34

Please sign in to comment.