[ARVADOS-WORKBENCH2] updated: 2.3.0-278-g8d374520

Git user git at public.arvados.org
Wed Apr 6 20:16:08 UTC 2022


Summary of changes:
 cypress/integration/collection.spec.js             | 23 ++++++++----
 .../collection-panel-files.tsx                     |  8 ++---
 .../collection-service/collection-service.test.ts  | 42 ++++++++++++++++++++++
 .../collection-service/collection-service.ts       |  8 ++---
 src/store/collections/collection-upload-actions.ts | 12 +++----
 .../collection-panel-files.ts                      |  4 +--
 .../dialog-forms/files-upload-collection-dialog.ts |  5 +--
 7 files changed, 77 insertions(+), 25 deletions(-)

       via  8d374520f28b507e8934d57be46374044fb93e2f (commit)
       via  52b7cea2ae6e69e5ccfebb6a393ab6054f39c552 (commit)
       via  14b107de3fe4c29f4a37f1958bad99e2b82d2b24 (commit)
       via  c8a07de05867fe2e959eb0063a674a4f026f5b76 (commit)
       via  44d370d6e0e9e91dbc579e7d990667d52ad67b17 (commit)
       via  992852b9506bd3092bd052c681afca966478f88b (commit)
      from  8045851b13e03215f3f2c8be6d54b43bd4619862 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 8d374520f28b507e8934d57be46374044fb93e2f
Merge: 8045851b 52b7cea2
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Wed Apr 6 22:15:08 2022 +0200

    Merge branch '18834-uploading-a-file-into-a-subdirectory-of-a-collection-does-not-work' into main
    closes #18834
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>


commit 52b7cea2ae6e69e5ccfebb6a393ab6054f39c552
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Wed Apr 6 22:08:41 2022 +0200

    18834: fixed double path separator
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/src/services/collection-service/collection-service.test.ts b/src/services/collection-service/collection-service.test.ts
index 4aa55ef3..88c5f725 100644
--- a/src/services/collection-service/collection-service.test.ts
+++ b/src/services/collection-service/collection-service.test.ts
@@ -111,7 +111,7 @@ describe('collection-service', () => {
             expect(webdavClient.upload.mock.calls[0][0]).toEqual("c=zzzzz-4zz18-0123456789abcde/test-file1");
         });
 
-        it('should upload files with custom uplaod target', async () => {
+        it.only('should upload files with custom uplaod target', async () => {
             // given
             const files: File[] = [{name: 'test-file1'} as File];
             const collectionUUID = 'zzzzz-4zz18-0123456789abcde';
@@ -122,7 +122,7 @@ describe('collection-service', () => {
 
             // then
             expect(webdavClient.upload).toHaveBeenCalledTimes(1);
-            expect(webdavClient.upload.mock.calls[0][0]).toEqual("c=zzzzz-4zz18-0123456789adddd/test-path//test-file1");
+            expect(webdavClient.upload.mock.calls[0][0]).toEqual("c=zzzzz-4zz18-0123456789adddd/test-path/test-file1");
         });
     });
 
diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index b45ae887..e5071d7e 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -121,7 +121,7 @@ export class CollectionService extends TrashableResourceService<CollectionResour
     }
 
     private async uploadFile(collectionUuid: string, file: File, fileId: number, onProgress: UploadProgress = () => { return; }, targetLocation: string = '') {
-        const fileURL = `c=${targetLocation !== '' ? targetLocation : collectionUuid}/${file.name}`;
+        const fileURL = `c=${targetLocation !== '' ? targetLocation : collectionUuid}/${file.name}`.replace('//', '/');
         const requestConfig = {
             headers: {
                 'Content-Type': 'text/octet-stream'

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list