Skip to content

Commit

Permalink
fix and update
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar committed Mar 4, 2022
1 parent c6a0d8f commit ec5a6a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/src/chunked_upload_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Future<Response> chunkedUpload({

late Response res;
if (size <= Client.CHUNK_SIZE) {
params[paramName] = await http.MultipartFile.fromPath(paramName, file.path!, filename: file.fileName);
params[paramName] = await http.MultipartFile.fromPath(paramName, file.path!, filename: file.filename);
return client.call(
HttpMethod.post,
path: path,
Expand Down Expand Up @@ -55,7 +55,7 @@ Future<Response> chunkedUpload({
raf.setPositionSync(offset);
final chunk = raf.readSync(Client.CHUNK_SIZE);
params[paramName] =
http.MultipartFile.fromBytes(paramName, chunk, filename: file.fileName);
http.MultipartFile.fromBytes(paramName, chunk, filename: file.filename);
headers['content-range'] =
'bytes $offset-${min<int>(((offset + Client.CHUNK_SIZE) - 1), size)}/$size';
res = await client.call(HttpMethod.post,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ dependencies:
web_socket_channel: ^2.1.0

dev_dependencies:
flutter_lints: ^1.0.4
flutter_test:
sdk: flutter
lints: ^1.0.1

0 comments on commit ec5a6a9

Please sign in to comment.