consolidated downloads dir, nextcloud origin, upload route and chat timestamps; added webdav path tests
This commit is contained in:
@@ -4,6 +4,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:background_downloader/background_downloader.dart' as bd;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
import '../../api/marianumcloud/webdav/webdav_api.dart';
|
||||
import '../../notification/notification_service.dart';
|
||||
@@ -34,6 +35,10 @@ class DownloadManager {
|
||||
/// "Teilen"/"Speichern" actions.
|
||||
static const _directory = 'downloads';
|
||||
|
||||
/// Where finished downloads land (`BaseDirectory.temporary` + [_directory]).
|
||||
static Future<Directory> downloadsDirectory() async =>
|
||||
Directory('${(await getTemporaryDirectory()).path}/$_directory');
|
||||
|
||||
final Map<String, DownloadJob> _jobs = {}; // keyed by remotePath
|
||||
final Map<String, DownloadJob> _byTaskId = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user