From: Peter Amstutz Date: Fri, 10 Feb 2023 16:12:13 +0000 (-0500) Subject: 19294: Use c= URLs instead of by_id URLs when wildcard isn't available X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/3e7c94478e72347cfb36934004d7b5f3eb891b46 19294: Use c= URLs instead of by_id URLs when wildcard isn't available Because by_id is currently read-only. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.test.tsx b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.test.tsx index ec0a9c8a58..d654f6edab 100644 --- a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.test.tsx +++ b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.test.tsx @@ -64,7 +64,7 @@ describe('WebDavS3InfoDialog', () => { ); // then - expect(wrapper.text()).toContain("davs://bobby@download.example.com/by_id/zzzzz-4zz18-b1f8tbldjrm8885"); + expect(wrapper.text()).toContain("davs://bobby@download.example.com/c=zzzzz-4zz18-b1f8tbldjrm8885"); }); it('render win/mac tab', () => { @@ -79,7 +79,7 @@ describe('WebDavS3InfoDialog', () => { ); // then - expect(wrapper.text()).toContain("https://download.example.com/by_id/zzzzz-4zz18-b1f8tbldjrm8885"); + expect(wrapper.text()).toContain("https://download.example.com/c=zzzzz-4zz18-b1f8tbldjrm8885"); }); it('render s3 tab with federated token', () => { diff --git a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx index 8e9edac11a..a32044a711 100644 --- a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx +++ b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx @@ -79,7 +79,7 @@ const mountainduckTemplate = ({ Port ${(cyberDavStr.split(':')[2] || '443').split('/')[0]} Username - ${username}${isValidIpAddress(collectionsUrl.replace('https://', ``).split(':')[0])? + ${username}${isValidIpAddress(collectionsUrl.replace('https://', ``).split(':')[0]) ? ` Path /c=${uuid}` : ''} @@ -120,8 +120,8 @@ export const WebDavS3InfoDialog = compose( } else { winDav = new URL(props.data.downloadUrl); cyberDav = new URL(props.data.downloadUrl); - winDav.pathname = `/by_id/${props.data.uuid}`; - cyberDav.pathname = `/by_id/${props.data.uuid}`; + winDav.pathname = `/c=${props.data.uuid}`; + cyberDav.pathname = `/c=${props.data.uuid}`; } cyberDav.username = props.data.username; @@ -279,8 +279,8 @@ export const WebDavS3InfoDialog = compose(

- Note: This curl command downloads single files. - Append the desired filename to the end of the URL. + Note: This curl command downloads single files. + Append the desired filename to the end of the URL.

@@ -292,7 +292,7 @@ export const WebDavS3InfoDialog = compose( color='primary' onClick={props.closeDialog}> Close - + ;