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

Fix createMemories() to download remote images #1351

Merged
merged 2 commits into from
Mar 19, 2020
Merged

Fix createMemories() to download remote images #1351

merged 2 commits into from
Mar 19, 2020

Conversation

nickmurison
Copy link

@nickmurison nickmurison commented Mar 19, 2020

While creating a custom config I discovered memories would not load properly if the image: value was a URL.

For example, a config YAML that is a direct copy of default.yml with a URL specified for one of the memory images like this:

memories:
  -
    image: 'https://pbs.twimg.com/media/ER-wbuRXkAQllCT?format=jpg&name=large'
    caption: 'Magn(et)ificent!'
    user: bjoernGoogle

Will result in a warning when starting up:

info: Port 3000 is available (OK)
info: Server listening on port 3000
warn: Failed to download https://pbs.twimg.com/media/ER-wbuRXkAQllCT?format=jpg&name=large (undefined)

Also, downloadToFile in createMemories looks like it was being called with the incorrect destination path, so I made it the same as in createProducts.

Nick Murison added 2 commits March 19, 2020 13:06
Signed-off-by: Nick Murison <nick.murison@miles.no>
Signed-off-by: Nick Murison <nick.murison@miles.no>
@bkimminich
Copy link
Member

Thank you! 👍 ... Send me you address via email and I'll gladly send you a couple stickers after the pandemia is over! 😷

@bkimminich bkimminich merged commit 8953087 into juice-shop:develop Mar 19, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants