Skip to content

Commit 83fc471

Browse files
committed
Fixed file param bug
1 parent 919223d commit 83fc471

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/examples/storage/create-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void main() { // Init SDK
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
;
1212
Future result = storage.createFile(
13-
file: '',
13+
file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'),
1414
);
1515

1616
result

lib/services/storage.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Storage extends Service {
3333
/// assigned to read and write access unless he has passed custom values for
3434
/// read and write arguments.
3535
///
36-
Future<Response> createFile({required String file, List read = const [], List write = const []}) {
36+
Future<Response> createFile({required MultipartFile file, List read = const [], List write = const []}) {
3737
final String path = '/storage/files';
3838

3939
final Map<String, dynamic> params = {

0 commit comments

Comments
 (0)