assaf fogelman
assaf fogelman
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
If you need any assistance, let me know 🙏
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
I hope Hono will pay attention to this issue, but at least there is a workaround, without using FormData. Thanks for your help!!!!
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
I tried to find a workaround and I indeed have...
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
but it still gave the same answer
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
but when I try only appending the file, it fails again:
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
another weird thing: if I only append the text to the FormData, and remove the boundary in the header, IT DOES WORK
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
No description
24 replies
HHono
Created by assaf fogelman on 7/14/2024 in #help
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
HHono
Created by assaf fogelman on 7/14/2024 in #help
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
HHono
Created by assaf fogelman on 7/14/2024 in #help
Uploading a file using FormData from React Native to Hono
it works with Postman
24 replies