|
|
|
@ -23,11 +23,14 @@ class _ApiService implements ApiService {
|
|
|
|
|
const _extra = <String, dynamic>{}; |
|
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
|
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())); |
|
|
|
|
} |
|
|
|
|