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);
40
40
late InputFile file;
41
41
42
42
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'));
44
44
} 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');
46
46
}
47
47
48
48
storage.createFile(
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import 'package:http/http.dart' show MultipartFile;
3
3
class InputFile {
4
4
final MultipartFile ? file;
5
5
final String ? path;
6
- final String ? fileName ;
6
+ final String ? filename ;
7
7
8
- InputFile ({this .file, this .path, this .fileName });
8
+ InputFile ({this .file, this .path, this .filename });
9
9
}
You can’t perform that action at this time.
0 commit comments