axios-tauri-api-adapter
axios-tauri-api-adapter copied to clipboard
buildTauriRequestData cannot process FormData
export function buildTauriRequestData(data) {
if (data === undefined || data === null) {
return undefined;
}
if (typeof data === 'string') {
return Body.text(data);
}
// there seems has a bug here, if data is a FormData instance, typeof data === 'object'
else if (typeof data === 'object') {
return Body.json(data);
}
else if (data instanceof FormData) {
// @ts-ignore
return Body.form(data);
}
return Body.bytes(data);
}
Thanks for bringing this up, if you have time to submit a pull request
The issue is fixed in #19, waiting for approval
The issue is fixed in #19, waiting for approval该问题已修复在 #19 ,等待审批
thanks