consolidated downloads dir, nextcloud origin, upload route and chat timestamps; added webdav path tests
This commit is contained in:
@@ -13,12 +13,12 @@ import '../app_progress_indicator.dart';
|
||||
/// trigger its `errorWidget`. Prefers `fileId` because the path variant
|
||||
/// is unreliable on some server configurations.
|
||||
String _ncPreviewUrl(RemoteFileRef remote, {int width = 1024}) {
|
||||
final host = EndpointData().nextcloud().full();
|
||||
final origin = EndpointData().nextcloud().origin();
|
||||
final id = remote.fileId;
|
||||
final selector = id != null
|
||||
? 'fileId=$id'
|
||||
: 'file=${Uri.encodeQueryComponent(remote.path)}';
|
||||
return 'https://$host/index.php/core/preview?$selector&x=$width&y=-1&a=1';
|
||||
return '$origin/index.php/core/preview?$selector&x=$width&y=-1&a=1';
|
||||
}
|
||||
|
||||
/// Header block for the "Vorschau nicht verfügbar" screen.
|
||||
|
||||
Reference in New Issue
Block a user