fluttercommunity / fluttercommunity/flutter_uploader
Multiple API requests are happening while trying to upload a file in the latest beta version of "flutter_uploader"
- Dominant language
- Dart
- Stars
- 218
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
I tried to use the package (latest beta versions) in my application. The events are emitting correctly but the package is making huge amount of network requests while the file is being uploaded.
I noticed that the package made around **92 API requests** under 5 seconds!!
I am attaching a redacted API request log along with the issue. Log: [uploader.log](https://github.com/fluttercommunity/flutter_uploader/files/5816003/uploader.log)
Phone: "Oneplus 6"
OS: "Android 10"
code:
```dart
final flutterUploader = FlutterUploader();
final taskId = await FlutterUploader().enqueue(
MultipartFormDataUpload(
url: 'https://url.com/post',
files: [
FileItem(
path: '/path/to'
field: 'field',
)
],
method: UploadMethod.POST,
headers: {},
data: {},
tag: 'tag_name',
);
final subscription = flutterUploader.progress.listen((progress) {
print('============');
log.print('progress.progress subscription', '${progress.progress}');
log.print('progress.status subscription', '${progress.status}');
print('============');
});
final result = flutterUploader.result.listen((progress) {
print('============');
log.print('progress.response result', '${progress.response}');
log.print('progress.status result', '${progress.status}');
log.print('progress.statusCode result', '${progress.statusCode}');
print('============');
});
```
Both the stable (https://github.com/fluttercommunity/flutter_uploader/issues/141) and beta versions have blockers due of which we aren't being able to use the package in out application. What do we do?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.