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

How to get the url to the already uploaded image #73

Closed
YuriyPrudnikov opened this issue Nov 29, 2018 · 1 comment
Closed

How to get the url to the already uploaded image #73

YuriyPrudnikov opened this issue Nov 29, 2018 · 1 comment

Comments

@YuriyPrudnikov
Copy link

Hello! How to get image url? The getUrl method is not appropriate, as it does not return the absolute path to the image)

@dmkdesign
Copy link
Collaborator

I believe this is not possible in the way you are thinking. "Attachments" protects the url route to the storage location using a fileController. The storage location is also hashed to improve file retrieval speed. So really the "file" is retrieved using $response->sendFile(). I have added the ability to get the file "inline" instead of by downloading by using $file->getUrl($inline=true). As well, if you use getUrl in an image tag it works as intended.

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