Skip to content

Flysystem disks visibility #503

@mjauvin

Description

@mjauvin

Winter CMS Build

Other (please specify below)

PHP Version

8.0

Database engine

MySQL/MariaDB

Plugins installed

No response

Issue description

Laravel\Illuminate\Filesystem\FilesystemManager now use Visibility::PRIVATE by default now when instanciating the LocalAdapter class.

ref. https://github.com/laravel/framework/blob/9.x/src/Illuminate/Filesystem/FilesystemManager.php#L169-L174

So we need to pass visibility => 'public' to the Disk config if we want the files/folder created under that disk to be publicly accessible.

The Image Resizer seems to be using the "local" disk in some parts of the code(folders/files creation) and the "system" disk in other parts (for mapping assets resources).

Steps to replicate

  • add this markup to a test page: {{ 'assets/images/my-test-image.jpg' | theme | resize(600,400) }}
  • Remove folder storage/app/resized
  • Open the page URL
  • look at the permissions of the storage/app/resized folder (and subfolders)

Workaround

Add 'visibility' => 'public' to the local disk definition.

Metadata

Metadata

Assignees

Labels

high priorityIssues that need to be more critically actioned

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions