From 929d8738df5dc208995dd2c0d4458db3c296719a Mon Sep 17 00:00:00 2001 From: guillermo2519 Date: Wed, 29 Apr 2026 21:21:44 -0600 Subject: [PATCH 1/3] =?UTF-8?q?Fix=C2=A0#5555:=20downloads=20not=20working?= =?UTF-8?q?=20from=20Bitstreams=20tab=20and=20Workspace/Workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../item-edit-bitstream-bundle.component.html | 2 +- .../upload/file/section-upload-file.component.spec.ts | 11 +++++++++++ .../upload/file/section-upload-file.component.ts | 8 ++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html index 8ed06a93672..2801621fc99 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.html @@ -97,7 +97,7 @@ headers="{{ entry.nameStripped }} {{ bundleName }} actions">
- { expect(compAsAny.editBitstreamData).toHaveBeenCalled(); }); + it('should return a Bitstream with correct uuid and _links from fileData', () => { + comp.fileData = fileData; + + const bitstream = comp.getBitstream(); + + expect(bitstream.uuid).toBe(fileData.uuid); + expect(bitstream._links.self.href).toBe(fileData.url); + expect(bitstream._links.content.href).toBe(fileData.url); + expect(bitstream._links.thumbnail.href).toBe(''); + }); + }); }); diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.ts b/src/app/submission/sections/upload/file/section-upload-file.component.ts index c6949bd3828..f1aa7be8b8f 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.ts +++ b/src/app/submission/sections/upload/file/section-upload-file.component.ts @@ -257,6 +257,14 @@ export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit, public getBitstream(): Bitstream { return Object.assign(new Bitstream(), { uuid: this.fileData.uuid, + _links: { + self: { href: this.fileData.url }, + content: { href: this.fileData.url }, + bundle: { href: '' }, + format: { href: '' }, + thumbnail: { href: this.fileData.thumbnail || '' }, + accessStatus: { href: '' }, + }, }); } From fab4f4b6cbd6cd9db172c960e0976c1969e0ddc0 Mon Sep 17 00:00:00 2001 From: guillermo2519 Date: Wed, 6 May 2026 23:33:23 -0600 Subject: [PATCH 2/3] Fix #5555: downloads not working from Workspace/Workflow submissions --- .../file/section-upload-file.component.html | 8 +++-- .../section-upload-file.component.spec.ts | 16 +++++----- .../file/section-upload-file.component.ts | 30 ++++++++----------- 3 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.html b/src/app/submission/sections/upload/file/section-upload-file.component.html index c1cdf266aaf..eb7b05adc78 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.html +++ b/src/app/submission/sections/upload/file/section-upload-file.component.html @@ -26,10 +26,12 @@
- +