You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm trying to respond with multipart/form-data format but cant find any working example of how i should do this. https://hono.dev/docs/api/context#body
How can i make working response with, for example, one png file const imageBuffer = await imageFile.arrayBuffer(); and some other field i.e. "{"json":"somejson"}"?
I've tried some approaches but they didn't work and insomnia returned errors in attempts to read response.
returnc.body(bodycontent? ||null,200,{// What format should i use for bodycontent? "Content-Type": "multipart/form-data";"boundary":${boundary},// Anything need to be added here? });
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, i'm trying to respond with multipart/form-data format but cant find any working example of how i should do this. https://hono.dev/docs/api/context#body
How can i make working response with, for example, one png file
const imageBuffer = await imageFile.arrayBuffer();
and some other field i.e."{"json":"somejson"}"
?I've tried some approaches but they didn't work and insomnia returned errors in attempts to read response.
Beta Was this translation helpful? Give feedback.
All reactions