[ARVADOS-WORKBENCH2] updated: 1.3.1-391-g34415722

Git user git at public.curoverse.com
Thu Mar 7 08:23:43 EST 2019


Summary of changes:
 src/common/webdav.ts                                  | 14 ++++++++------
 src/services/collection-service/collection-service.ts |  2 +-
 2 files changed, 9 insertions(+), 7 deletions(-)

       via  344157221aba0ca459e3024a79530287c8113a5c (commit)
       via  76391dab2901f85d60511dae262409db3c7a7547 (commit)
       via  925be511793917860af49dea68d767e158a5f41c (commit)
      from  fa29a709a18ab248f87d954cbac9cf89de34c031 (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 344157221aba0ca459e3024a79530287c8113a5c
Merge: fa29a709 76391dab
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Mar 7 14:23:28 2019 +0100

    Merge branch '14910-uploading-files-to-collection'
    
    refs #14910
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>


commit 76391dab2901f85d60511dae262409db3c7a7547
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Mar 7 14:23:04 2019 +0100

    Delete unused parameter of webdav.upload
    
    Feature #14910
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/common/webdav.ts b/src/common/webdav.ts
index aef97c8c..a09e8fdd 100644
--- a/src/common/webdav.ts
+++ b/src/common/webdav.ts
@@ -28,7 +28,7 @@ export class WebDAV {
             data
         })
 
-    upload = (url: string, path: string, files: File[], config: WebDAVRequestConfig = {}) => {
+    upload = (url: string, files: File[], config: WebDAVRequestConfig = {}) => {
         return Promise.all(
             files.map(file => this.request({
                 ...config, url,
diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index f7e25541..86b1aded 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -80,7 +80,7 @@ export class CollectionService extends TrashableResourceService<CollectionResour
                 onProgress(fileId, e.loaded, e.total, Date.now());
             }
         };
-        return this.webdavClient.upload(fileURL, '', [file], requestConfig);
+        return this.webdavClient.upload(fileURL, [file], requestConfig);
     }
 
     update(uuid: string, data: Partial<CollectionResource>) {

commit 925be511793917860af49dea68d767e158a5f41c
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Mar 7 14:19:45 2019 +0100

    Wait for all files upload to complete with Promise.all
    
    Feature #14910
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/common/webdav.ts b/src/common/webdav.ts
index 1a7da835..aef97c8c 100644
--- a/src/common/webdav.ts
+++ b/src/common/webdav.ts
@@ -29,11 +29,13 @@ export class WebDAV {
         })
 
     upload = (url: string, path: string, files: File[], config: WebDAVRequestConfig = {}) => {
-        return files.map(file => this.request({
-            ...config, url,
-            method: 'PUT',
-            data: file
-        }));
+        return Promise.all(
+            files.map(file => this.request({
+                ...config, url,
+                method: 'PUT',
+                data: file
+            }))
+        );
     }
 
     copy = (url: string, destination: string, config: WebDAVRequestConfig = {}) =>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list