Skip to content

Conversation

@adriaanzon
Copy link

Adds a method similar to getAvailablePath() that calls getPathRelativeToRoot() instead of getPath().

This allows code like the following, in cases where you use the local filesystem driver in your development environment and the s3 driver in production, as getPath() returns the absolute path which you cannot pass to Storage::get().

Storage::disk($media->disk)->get(
    $media->getAvailablePathRelativeToRoot(['conversion'])
)

@adriaanzon adriaanzon changed the title Add getAvailablePathRelativeToRoot method Add getAvailablePathRelativeToRoot() method Nov 14, 2025
@freekmurze
Copy link
Member

Some of the tests are failing, could you have a look?

@adriaanzon
Copy link
Author

This is an issue in Testbench: orchestral/testbench-core#368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants