@@ -90,7 +90,7 @@ class Uploader {
9090 uploadStatusProvider.current++ ;
9191 }
9292 uploadStatusProvider.reset ();
93- } on DioError catch (e) {
93+ } catch (e) {
9494 debugPrint (e.message);
9595 uploadStatusProvider.reset ();
9696 ScaffoldMessenger .of (context).hideCurrentSnackBar ();
@@ -151,24 +151,17 @@ class Uploader {
151151 ),
152152 ));
153153
154- try {
155- return await chunkedUploader.upload (
156- context: context,
157- path: "/ws.php" ,
158- filePath: await FlutterAbsolutePath .getAbsolutePath (photo.path),
159- maxChunkSize: API .prefs.getInt ("upload_form_chunk_size" )* 1000 ,
160- params: queries,
161- method: 'POST' ,
162- data: fields,
163- contentType: Headers .formUrlEncodedContentType,
164- onUploadProgress: (value) => onProgress (value),
165- );
166- } on DioError catch (e) {
167- debugPrint ('Dio upload chunk error $e ' );
168- ScaffoldMessenger .of (context).hideCurrentSnackBar ();
169- ScaffoldMessenger .of (context).showSnackBar (errorSnackBar (context, appStrings (context).uploadError_title));
170- return Future .value (null );
171- }
154+ return await chunkedUploader.upload (
155+ context: context,
156+ path: "/ws.php" ,
157+ filePath: await FlutterAbsolutePath .getAbsolutePath (photo.path),
158+ maxChunkSize: API .prefs.getInt ("upload_form_chunk_size" )* 1000 ,
159+ params: queries,
160+ method: 'POST' ,
161+ data: fields,
162+ contentType: Headers .formUrlEncodedContentType,
163+ onUploadProgress: (value) => onProgress (value),
164+ );
172165 }
173166}
174167
0 commit comments