Closed ridoo closed 5 months ago
Adding tabular
to DatasetDownloadHandler: download_url() will add proper links to /datasets
response:
"download_urls": [
{
"url": "/datasets/geonode:horizon_data/dataset_download",
"ajax_safe": true,
"default": true
}
]
However, the download link responds with:
{
"error": "NoApplicableCode: Process failed during execution\norg.geotools.process.ProcessException: Don't know how to encode in mime type image/tiff\nDon't know how to encode in mime type image/tiff"
}
More testing reveals that there's both download_urls
(plural) and download_url
(singular). Not sure why this is the case. However, the current fix only considered the plural case:
{
"links": {
"next": null,
"previous": null
},
"total": 2,
"page": 1,
"page_size": 10,
"datasets": [
{
"download_urls": [
{
"url": "/datasets/geonode:horizon_data/dataset_download",
"ajax_safe": true,
"default": true
}
],
"download_url": null
},
{
"download_urls": [
{
"url": "/datasets/geonode:laboratory_data/dataset_download",
"ajax_safe": true,
"default": true
}
],
"download_url": null
}
]
}
The single case has to be fixed to, of course.
Fixed
See https://github.com/GeoNodeUserGroup-DE/geonode-dev-datapackage/issues/4
DatasetDownloadHandler:
download_url()