diff --git a/lib/src/storage/local_storage.dart b/lib/src/storage/local_storage.dart index 83116d9..4445927 100644 --- a/lib/src/storage/local_storage.dart +++ b/lib/src/storage/local_storage.dart @@ -44,4 +44,7 @@ class LocalStorage implements StorageDriver { await file.writeAsBytes(bytes); return file.path.replaceFirst(storagePath, ''); } + + @override + String fullPath(String file) => "$storagePath/$file"; } diff --git a/lib/src/storage/storage_driver.dart b/lib/src/storage/storage_driver.dart index 736fa7c..4644126 100644 --- a/lib/src/storage/storage_driver.dart +++ b/lib/src/storage/storage_driver.dart @@ -2,13 +2,15 @@ import 'dart:typed_data'; abstract class StorageDriver { Future put( - String filePath, + String fileName, List bytes, ); - Future get(String filepath); + Future get(String fileName); + + String fullPath(String file); - Future exists(String filepath); + Future exists(String fileName); - Future delete(String filepath); + Future delete(String fileName); } diff --git a/pubspec.yaml b/pubspec.yaml index ff67064..f57be91 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,5 +29,5 @@ dependencies: dev_dependencies: lints: ^3.0.0 test: ^1.25.2 - http: ^1.2.0 + http: ^1.2.1 http_parser: ^4.0.2