<key>Port</key>
<string>${(cyberDavStr.split(':')[2] || '443').split('/')[0]}</string>
<key>Username</key>
- <string>${username}</string>${isValidIpAddress(collectionsUrl.replace('https://', ``).split(':')[0])?
+ <string>${username}</string>${isValidIpAddress(collectionsUrl.replace('https://', ``).split(':')[0]) ?
`
<key>Path</key>
<string>/c=${uuid}</string>` : ''}
} 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;
}
const wgetCommand = `wget --http-user=${props.data.username} --http-passwd=${props.data.token} --mirror --no-parent --no-host --cut-dirs=0 ${winDav.toString()}`;
+ const curlCommand = `curl -O -u ${props.data.username}:${props.data.token} ${winDav.toString()}`;
return <Dialog
open={props.open}
Download Cyber/Mountain Duck bookmark
</Button>
- <h3>Gnome</h3>
+ <h3>GNOME</h3>
<ol>
<li>Open Files</li>
<li>Select +Other Locations</li>
</DetailsAttribute>
<DetailsAttribute
- label='Username'
- value={props.data.username}
- copyValue={props.data.username} />
+ label='Curl command'
+ copyValue={curlCommand}
+ classValue={props.classes.detailsAttrValWithCode}>
+ <DefaultCodeSnippet
+ lines={[curlCommand]} />
+ </DetailsAttribute>
- <DetailsAttribute
- label='Password'
- value={props.data.token}
- copyValue={props.data.token} />
+ <p>
+ Note: This curl command downloads single files.
+ Append the desired filename to the end of the URL.
+ </p>
</TabPanel>
color='primary'
onClick={props.closeDialog}>
Close
- </Button>
+ </Button>
</DialogActions>
</Dialog >;