-
Notifications
You must be signed in to change notification settings - Fork 70
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
Feature Request: Allow download url to be overridden. #129
Comments
This pull request introduced a potential breaking change, by making downloadUrl mandatory for IAlbum. I know it's my fault for hard typing the variable (first argument to lightbox.open) to IAlbum[] when declaring it, whereas in your example it's declared as generic, but I can't see a reason why we shouldn't, since open() actually takes an IAlbum[] as its first argument. And I really think downloadUrl should be optional. Code:
Error:
|
The change to make the property in the interface optional would be: downloadUrl?: string The rest of the code should already work. |
Pull request created: #136 . |
Right now the package attempts to pull the src passed in on the image object and trigger a save, however; this doesn't work when images are hosted on separate origins due to CORS. It would be a great feature if you can add a property, say "downloadUrl" that if populated, is used instead of the src value on download click. This allows users to proxy download when necessary while still loading the original source without a proxy.
The text was updated successfully, but these errors were encountered: