Skip to content

Commit 62b74ce

Browse files
committed
modified curl, download bitstreams based on the name as separeated api calling
1 parent 0f240e6 commit 62b74ce

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/app/item-page/clarin-files-section/clarin-files-section.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ export class ClarinFilesSectionComponent implements OnInit {
107107
return file.name;
108108
});
109109

110-
const url = `${this.halService.getRootHref()}/core/items/${this.item.id}/allzip?handleId=${this.itemHandle}`;
111-
this.command = `curl -o "allzip.zip" "${url}"`;
110+
// Generate curl command for individual bitstream downloads
111+
const baseUrl = `${this.halService.getRootHref()}/bitstream/${this.itemHandle}`;
112+
const fileNamesFormatted = fileNames.map((fileName, index) => `/${index}/${fileName}`).join(',');
113+
this.command = `curl -O ${baseUrl}{${fileNamesFormatted}} -k`;
112114
}
113115

114116
loadDownloadZipConfigProperties() {

0 commit comments

Comments
 (0)