mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-27 02:58:05 +01:00
Fix chart download issue (#15472)
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
eca3d82d9c
commit
4e998b7dce
@ -169,9 +169,9 @@ export class HelmChartDefaultService extends HelmChartService {
|
||||
let chartFileRegexPattern = new RegExp('^http.*/chartrepo/(.*)');
|
||||
if (chartFileRegexPattern.test(filename)) {
|
||||
let match = filename.match('^http.*/chartrepo/(.*)');
|
||||
url = `${V1_BASE_HREF + "/chartrepo"}/${match[1]}`;
|
||||
url = `${DOWNLOAD_CHART_ENDPOINT}/${match[1]}`;
|
||||
} else {
|
||||
url = `${V1_BASE_HREF + "/chartrepo"}/${projectName}/${filename}`;
|
||||
url = `${DOWNLOAD_CHART_ENDPOINT}/${projectName}/${filename}`;
|
||||
}
|
||||
return this.http.get(url, {
|
||||
responseType: 'blob',
|
||||
@ -209,3 +209,6 @@ export class HelmChartDefaultService extends HelmChartService {
|
||||
.pipe(catchError(this.handleErrorObservable));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const DOWNLOAD_CHART_ENDPOINT: string = "/chartrepo";
|
||||
|
Loading…
Reference in New Issue
Block a user