Merge pull request #1004 from atmire/w2p-76150_Add-a-bitstream-download-page

Bitstream download page
This commit is contained in:
Tim Donohue
2021-04-08 12:23:43 -05:00
committed by GitHub
31 changed files with 569 additions and 154 deletions

View File

@@ -41,7 +41,7 @@ import { FormBuilderService } from '../../../../shared/form/builder/form-builder
function getMockFileService(): FileService {
return jasmine.createSpyObj('FileService', {
downloadFile: jasmine.createSpy('downloadFile'),
retrieveFileDownloadLink: jasmine.createSpy('retrieveFileDownloadLink'),
getFileNameFromResponseContentDisposition: jasmine.createSpy('getFileNameFromResponseContentDisposition')
});
}
@@ -232,7 +232,7 @@ describe('SubmissionSectionUploadFileComponent test suite', () => {
tick();
expect(fileService.downloadFile).toHaveBeenCalled();
expect(fileService.retrieveFileDownloadLink).toHaveBeenCalled();
}));
it('should save Bitstream File data properly when form is valid', fakeAsync(() => {

View File

@@ -224,7 +224,7 @@ export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit {
first())
.subscribe((url) => {
const fileUrl = `${url}/${this.fileData.uuid}/content`;
this.fileService.downloadFile(fileUrl);
this.fileService.retrieveFileDownloadLink(fileUrl);
});
}