File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ Storage storage = Storage(client);
4040late InputFile file;
4141
4242if(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
4848storage.createFile(
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import 'package:http/http.dart' show MultipartFile;
33class 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}
You can’t perform that action at this time.
0 commit comments