diff --git a/lib/community/release_dynamic.dart b/lib/community/release_dynamic.dart index 7e649ea8..cacbb575 100644 --- a/lib/community/release_dynamic.dart +++ b/lib/community/release_dynamic.dart @@ -186,7 +186,7 @@ class _ReleaseDynamic extends State { } else { thumbnail = await Thumbnails.getThumbnail( videoFile: file.path, - imageType: ThumbFormat.WEBP, + imageType: ThumbFormat.JPEG, quality: 10, ); } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 9dee0b09..70952c93 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -23,11 +23,14 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = FormData(); + String fileName = data.path.split(Platform.pathSeparator).last; + if(!fileName.contains(".jpeg")) + fileName += ".jpeg"; _data.files.add(MapEntry( 'file', MultipartFile.fromFileSync(data.path, - filename: data.path.split(Platform.pathSeparator).last))); - print("filename:${data.path}"); + filename: fileName))); + print("filename:$fileName"); if (folderId != null) { _data.fields.add(MapEntry('folderId', folderId.toString())); }