I'm trying to upload some files from my react native client to nodejs server using multer.
If I try to upload those files using Postman it works great, but when I do this using my mobile app it gives me this error:
Error: Unexpected end of multipart data
at /home/ema/iDiary/iDiary-server/node_modules/dicer/lib/Dicer.js:62:28
at processTicksAndRejections (internal/process/next_tick.js:74:9)
I don't think is a server problem but this is the part of code that takes the file in:
I'm trying to upload some files from my react native client to nodejs server using multer. If I try to upload those files using Postman it works great, but when I do this using my mobile app it gives me this error:
I don't think is a server problem but this is the part of code that takes the file in:
and this is my react native code where I get the file using react-native-document-picker:
and in the end this is the code where I send the files to my server:
If anyone knows the solution I would be glad to him if it would share it with me.