Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed May 30, 2024
1 parent d8b3371 commit ac61f0b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,13 @@ public function extractFileInformation(UploadedFile|HttpFile $file): static

protected function performMediaTransformations(UploadedFile|HttpFile $file): UploadedFile|HttpFile
{

$file = $this->model->registerMediaTransformations($this, $file);

$this->extractFileInformation($file); // refresh file informations
if (
$this->relationLoaded('model') ||
($this->model_id && $this->model_type)
) {
$file = $this->model->registerMediaTransformations($this, $file);
$this->extractFileInformation($file); // refresh file informations
}

return $file;
}
Expand Down

0 comments on commit ac61f0b

Please sign in to comment.