retrofit.dart icon indicating copy to clipboard operation
retrofit.dart copied to clipboard

Support single MultipartFile, not only List<MultipartFile>

Open brun0xon opened this issue 2 years ago • 2 comments

Cannot pass single MultipartFile as Part() param. Getting generator error Exception: toJson() method have to add to MultipartFile. I can't use File type, because generator uses Platform.pathSeparator which throws in web, and can't use List<int>, because it may be a different file extension type.

brun0xon avatar Apr 01 '22 09:04 brun0xon

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 01 '22 15:05 stale[bot]

@trevorwang Is there no progress on this problem?

Dio supports single file sending - https://pub.dev/packages/dio#sending-formdata

StarProxima avatar Feb 23 '24 19:02 StarProxima