noi-techpark / odh-api-core

.Net Core Port of ODH Tourism Api
2 stars 2 forks source link

As an Open Data Hub manager I want to upload through the Metadata API an image for each dataset, to improve the rendering on the website. #365

Closed sseppi closed 9 months ago

sseppi commented 1 year ago

The Image will be uploaded through the new Data Browser and stored. Each image should have at least the following fields:

The goal is to reuse the file uploader component already developed in the Data Browser.

RudiThoeni commented 1 year ago

Hi Stefano I added the well known ImageGallery Object List to the Metadata Data model

image

so now it should be easily reused the ImageGallery Component in the Databrowser

sseppi commented 1 year ago

@ila131 and @d3liaa can you please add the Gallery Component configuration of this new field of the MetaData API on the Detail and Edit view?

sseppi commented 1 year ago

@d3liaa can you please test this feature and let me know if everythin is fine?

d3liaa commented 1 year ago

Everything works as it should :) Q: Is it correct that the image is not displayed in the list view ?

sseppi commented 1 year ago

@d3liaa Thank you for testing and letting us know!

For the images in the list view, we will discuss it and let you know.

RudiThoeni commented 1 year ago

Hi @d3liaa

Q: Is it correct that the image is not displayed in the list view ?

You mean that the property ImageGallery is not in the json output? On next time you edit/save a metadata object it should be populated

RudiThoeni commented 1 year ago

now i have seen there is always "ImageGallery": null, in each record means no ImageGallery is set.....

did you test to upload an image and save the object?

RudiThoeni commented 1 year ago

I tested and it worked https://api.tourism.testingmachine.eu/v1/MetaData/751dc9ad-5fd9-4b48-b98d-6702f5be57a9

"ImageGallery": [
{
"Width": null,
"Height": null,
"License": null,
"ValidTo": null,
"ImageUrl": "https://images.tourism.testingmachine.eu/api/Image/GetImage?imageurl=958f3591-3650-4e95-b04e-7a737af152d0.png",
"CopyRight": null,
"ImageDesc": {},
"ImageName": null,
"ImageTags": null,
"ValidFrom": null,
"ImageTitle": {},
"ImageSource": null,
"IsInGallery": null,
"ImageAltText": {},
"ListPosition": null,
"LicenseHolder": null
}
],
"SingleDataset": true,
"ApiDescription": {
"en": "This dataset exposes all events taking place at NOI Techpark"
}
d3liaa commented 1 year ago

@RudiThoeni : no, sorry maybe i was not clear. I just asked if the image should be visible in the table view. It was a pure configuration and design question.