Connect saved machines concurrently in the chat workspace
This commit is contained in:
@@ -28,15 +28,10 @@ FileUrls? fileUrls(String configuredEndpoint, String path) {
|
||||
final value = path;
|
||||
if (value.trim().isEmpty) return null;
|
||||
try {
|
||||
final endpoint = ServerUrl.validate(configuredEndpoint);
|
||||
final base = Uri.parse(
|
||||
endpoint.httpUrl,
|
||||
).replace(path: '/files', query: null, fragment: null);
|
||||
Uri make({required bool download}) => base.replace(
|
||||
queryParameters: <String, String>{
|
||||
'path': value,
|
||||
if (download) 'download': '1',
|
||||
},
|
||||
Uri make({required bool download}) => ServerUrl.resourceUri(
|
||||
configuredEndpoint,
|
||||
'/files',
|
||||
query: <String, String>{'path': value, if (download) 'download': '1'},
|
||||
);
|
||||
return FileUrls(
|
||||
view: make(download: false),
|
||||
|
||||
Reference in New Issue
Block a user