FIX: Implement WebDAV Move and simplified move file handler
This commit is contained in:
@@ -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':
|
||||
|
||||
@@ -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}');
|
||||
|
||||
Reference in New Issue
Block a user