Skip to content

Commit c6a0d8f

Browse files
committed
fix the param
1 parent ef41806 commit c6a0d8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Storage storage = Storage(client);
4040
late InputFile file;
4141
4242
if(kIsWeb) {
43-
file = InputFile(file: MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'));
43+
file = InputFile(file: await MultipartFile.fromFile('file', './path-to-file/image.jpg', filename: 'image.jpg'));
4444
} else {
45-
file = InputFile(path: './path-to-file/image.jpg', fileName: 'image.jpg');
45+
file = InputFile(path: './path-to-file/image.jpg', filename: 'image.jpg');
4646
}
4747
4848
storage.createFile(

lib/src/input_file.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:http/http.dart' show MultipartFile;
33
class InputFile {
44
final MultipartFile? file;
55
final String? path;
6-
final String? fileName;
6+
final String? filename;
77

8-
InputFile({this.file, this.path, this.fileName});
8+
InputFile({this.file, this.path, this.filename});
99
}

0 commit comments

Comments
 (0)