-
Notifications
You must be signed in to change notification settings - Fork 492
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
standardize image url #10855
standardize image url #10855
Changes from 3 commits
695709c
c80a3df
b923814
18c9211
47a2233
48f9f72
d215221
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Search API (/api/search) response will now include new image_url format for the Datafile and Dataverse logo. | ||
Note to release note writer: this supersedes the release note 10810-search-api-payload-extensions.md | ||
|
||
For Dataverse: | ||
|
||
- "image_url" (optional) | ||
|
||
```javascript | ||
"items": [ | ||
{ | ||
"name": "Darwin's Finches", | ||
... | ||
"image_url":"/api/access/dvCardImage/{identifier}" | ||
(etc, etc) | ||
``` | ||
|
||
For DataFile: | ||
|
||
- "image_url" (optional) | ||
|
||
```javascript | ||
"items": [ | ||
{ | ||
"name": "test.txt", | ||
... | ||
"image_url":"/api/access/datafile/{identifier}?imageThumb=true" | ||
(etc, etc) | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,11 @@ This API changelog is experimental and we would love feedback on its usefulness. | |
:local: | ||
:depth: 1 | ||
|
||
v6.4 | ||
---- | ||
|
||
- ** /api/search?q=**: Json values for image_url in DataFiles and Collections have changed from Base64URL ("data:image/png;base64,...) to "/api/access/datafile/{identifier}?imageThumb=true" and "/api/access/dvCardImage/{identifier}" respectively. This was done to match the image_url of Dataset. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still need this release note if we merge this before we release 6.4? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed for now. can be re-added if this doesn't make 6.4 |
||
|
||
v6.3 | ||
---- | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In #10811 the following line was added: "Note that the image_url field, if exists, will be returned as a regular URL for Datasets, while for Files and Dataverses, it will be returned as a Base64 URL. We plan to standardize this behavior so that the field always returns a regular URL. (See: #10831)" Can we remove it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed. also modified the example json |
||
|
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.
If the image_url is always returned, even though the URL returns a 404 for files and a 204 for collections, then it is not an optional field. Anyway, check my final review comment, where I suggest not adding the fields to the payload in these cases.
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.
@GPortas what if when no image is available the endpoint just returns
image_url: null
?In that way we will know that
image_url
could be either astring
(image exists) ornull
.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.
removed image_url if none exists