Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Provider Data/Path to 404 when creating images #1555

Open
tacman opened this issue Jan 5, 2024 · 1 comment
Open

Add Provider Data/Path to 404 when creating images #1555

tacman opened this issue Jan 5, 2024 · 1 comment

Comments

@tacman
Copy link
Contributor

tacman commented Jan 5, 2024

Is your feature request related to a problem? Please describe.

Debugging a missing image could be easier.
Describe the solution you'd like

image

It took me too long to figure out that I had a redundancy in my path

# config/packages/flysystem.yaml
# Read the documentation at https://github.com/thephpleague/flysystem-bundle/blob/master/docs/1-getting-started.md
flysystem:
    storages:
        default.storage:
            adapter: 'local'
            options:
                directory: '%kernel.project_dir%/public/images'

But I was passing

            {% set imagePath = '/images/%s/%s'|format(official.wikidataId, imageCode) %}
{{ imagePath | imagine_filter(''thumbnail') 

My error was duplicating /images in the argument passed to the filter.

My feature request is that more information be included in the error. If it said "could not be found in 'default.storage'" that would give me a starting point.

If it were able to get the directory from the options and tell me in the error message that /images/images/code couldn't be found, wow, that'd be awesome.

I have another issue somewhere related to this, where I'm trying to get the underlying filename. In that particular case, I wanted to know if the file was missing so I could download it before continuing, or at least trigger an async message to do so.

@dbu
Copy link
Member

dbu commented Jan 6, 2024

is there an inner exception that provides more context?

and if not, would it be possible to improve the flysystem exception to tell the full path of what was not found?

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

No branches or pull requests

2 participants