diff --git a/CHANGELOG.md b/CHANGELOG.md index f7550a2..40f4c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 7.0.0 +- [BREAKING CHANGE] `MultipartFileRecreatable` removed. Use a regular `MultipartFile` instead of `MultipartFileRecreatable`. + ## 6.0.0 - Updated internal libraries. - Bumped minimum Dart SDK to 3.0. diff --git a/README.md b/README.md index 6f81fb6..503c2dd 100644 --- a/README.md +++ b/README.md @@ -118,18 +118,9 @@ dio.interceptors.add( await dio.get('https://mock.codes/400'); ``` -## Retry requests with `multipart/form-data` -Because dio's class for multipart data `MultipartFile` doesn't support stream rewinding (recreation) to support retry for multipart data you should use a class `MultipartFileRecreatable` instead of `MultipartFile`. \ -Here is an example: -```dart -final formData = - FormData.fromMap({'file': MultipartFileRecreatable.fromFileSync('README.md')}); - await dio.post( - 'https://multipart.free.beeceptor.com/post500', - data: formData, - ); -``` -See the full example in the test: https://github.com/rodion-m/dio_smart_retry/blob/63a3bddae8b5a0581c35c4ae5e973996561d9100/test/multipart_retry_tests.dart#L32-L61 +## Migrating to 7.0 + +Use `MultipartFile` instead of `MultipartFileRecreatable`. ## Migrating to 6.0 diff --git a/pubspec.yaml b/pubspec.yaml index dde8996..bd6fa21 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: dio_smart_retry description: Retry library for Dio and Dio package made with love. By default, the request will be retried only for appropriate retryable http statuses. -version: 6.0.0 +version: 7.0.0 repository: https://github.com/rodion-m/dio_smart_retry issue_tracker: https://github.com/rodion-m/dio_smart_retry/issues homepage: https://github.com/rodion-m/dio_smart_retry