-
Notifications
You must be signed in to change notification settings - Fork 83
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(view-data): Add image content type check for URLs in view data page #255
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kartik-gupta-ij.
Super fast turnaround.
src/components/Points/PointImage.jsx
Outdated
useEffect(() => { | ||
const fetchImageUrls = async () => { | ||
const urls = []; | ||
for (const key in data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought.
Maybe a Promise.all
to check them all at once?
…current checks in view data page
Is that correct that with this change web-ui will send requests to all URLs on preview? |
Yes. For the 10 points that are displayed, if the value is a URL and doesn't have an image extension in it, A HEAD request is made. |
It is arguable, that this is actually desired behavior. What's the use-case? |
Only one actually. To support image URLs like https://www.bothellwa.gov/ImageRepository/Document?documentID=8024. |
fixes : #253