FIX: Implement WebDAV Move and simplified move file handler

This commit is contained in:
Leon Bösche
2026-01-11 23:14:45 +01:00
parent 0378a0748a
commit af5c8f0e72
5 changed files with 74 additions and 35 deletions

View File

@@ -271,7 +271,7 @@ class FileBrowserBloc extends Bloc<FileBrowserEvent, FileBrowserState> {
if (a.type != b.type) {
return a.type == FileType.folder ? -1 : 1;
}
// Within the same type (both folders or both files), sort by the selected criterion
switch (sortBy) {
case 'name':

View File

@@ -163,10 +163,7 @@ class FileService {
) async {
final response = await apiClient.post(
'/orgs/$orgId/files/move',
data: {
'sourcePath': sourcePath,
'targetPath': targetPath,
},
data: {'sourcePath': sourcePath, 'targetPath': targetPath},
);
if (response.statusCode != 200) {
throw Exception('Failed to move file: ${response.statusCode}');