assaf fogelman
Uploading a file using FormData from React Native to Hono
this is the output with Logger():
<-- POST /user/test
TypeError: Failed to parse body as FormData.
at node:internal/deps/undici/undici:5410:27
at successSteps (node:internal/deps/undici/undici:5454:27)
at fullyReadBody (node:internal/deps/undici/undici:4381:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async consumeBody (node:internal/deps/undici/undici:5463:7)
at async parseFormData (file:///C:/programming/_chat_app/chat-app/backend-server/node_modules/hono/dist/utils/body.js:13:20)
at async HonoRequest.parseBody (file:///C:/programming/_chat_app/chat-app/backend-server/node_modules/hono/dist/request.js:56:42)
at test (C:\programming_chat_app\chat-app\backend-server\src\routes\user\user.ts:49:18)
at async dispatch (file:///C:/programming/_chat_app/chat-app/backend-server/node_modules/hono/dist/compose.js:29:17)
at async cors2 (file:///C:/programming/_chat_app/chat-app/backend-server/node_modules/hono/dist/middleware/cors/index.js:70:5)
--> POST /user/test 200 236ms
24 replies
Uploading a file using FormData from React Native to Hono
but I also uploaded from React Native to Multer (in Express) many times successfully, so my guess is that it is something with how Hono interacts with the React Native FormData (which is different than the JS FormData it seems...)
Or I don't know
24 replies