Skip to content

Commit

Permalink
import should not override visibility unless explicitly specified
Browse files Browse the repository at this point in the history
  • Loading branch information
frasmage committed Mar 30, 2024
1 parent 14a4386 commit 7454426
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/MediaUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,9 @@ public function import(string $disk, string $directory, string $filename, string
$model->aggregate_type = $this->inferAggregateType($model->mime_type, $model->extension);
$model->size = $this->verifyFileSize($storage->size($model->getDiskPath()));

$storage->setVisibility($model->getDiskPath(), $this->getVisibility());
if ($this->visibility) {
$storage->setVisibility($model->getDiskPath(), $this->visibility);
}

if (is_callable($this->before_save)) {
call_user_func($this->before_save, $model, $this->source);
Expand Down

0 comments on commit 7454426

Please sign in to comment.