diff --git a/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.html b/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.html index b4090f1b9ae5459e53d39a55c175fb2a663ee3e9..23ce465077a6d19a538209ad06a4b43e160e8058 100644 --- a/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.html +++ b/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.html @@ -207,7 +207,7 @@ </svg> </button> <div class="resource-download-icon"> - <app-download-button [url]="queryableUrl" [fileName]="getFileName()"> + <app-download-button [url]="downloadUrl" [fileName]="getFileName()"> </app-download-button> </div> diff --git a/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.ts b/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.ts index 405aaa50fd2ebabcb924f9315a20b77a12be4f96..0a57279dd22c34bd0e599856ecbf2fa19fef7b67 100644 --- a/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.ts +++ b/src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.ts @@ -2,6 +2,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { communeInsee } from '../../../../../../assets/resources/commune-insee'; import { geosource } from '../../../../../../i18n/traductions'; +import { APP_CONFIG } from '../../../../../core/services/app-config.service'; import { linkFormats, Metadata } from '../../../../../shared/models'; import { Format, Projection, Resource } from '../../../../models'; import { DatasetDetailService } from '../../../../services'; @@ -500,4 +501,11 @@ export class ResourceQueryableComponent implements OnInit { } } + + get downloadUrl() { + return this.queryableUrl.replace( + 'https://download.data.grandlyon.com', + `${APP_CONFIG.backendUrls.proxyQuery}/download`, + ); + } }