Browse Source

文件上传更改

ff_new
w-R 3 years ago
parent
commit
4e7e4cf898
  1. 2
      lib/retrofit/retrofit_api.g.dart

2
lib/retrofit/retrofit_api.g.dart

@ -24,7 +24,7 @@ class _ApiService implements ApiService {
final queryParameters = <String, dynamic>{};
final _data = FormData();
String fileName = data.path.split(Platform.pathSeparator).last;
if(!fileName.contains(".jpeg"))
if(!fileName.contains(".jpeg") && !fileName.contains(".mp4") && !fileName.contains(".png"))
fileName += ".jpeg";
_data.files.add(MapEntry(
'file',

Loading…
Cancel
Save