Skip to content

Commit

Permalink
Return correct URLs from File->getPublicPath for non-local disks (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjscc authored Feb 20, 2023
1 parent c95c950 commit 4ed9b10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/system/models/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getPublicPath()
$uploadsPath .= '/protected';
}

return Url::asset($uploadsPath) . '/';
return $this->getDisk()->url($uploadsPath) . '/';
}

/**
Expand Down

1 comment on commit 4ed9b10

@LukeTowers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wpjscc I had to revert this, see #844 for a WIP PR to refactor our usage of these "pseudo" disks. In the meantime you should be able to solve your immediate issues by setting the path property to an absolute URL in your project's configuration.

@jaxwilko should be happy to see the refactoring PR 😉

Please sign in to comment.