cljsrn

https://github.com/drapanjanas/re-natal | https://github.com/drapanjanas/re-natal/wiki/FAQ | https://github.com/condense/mercury-app/wiki | https://github.com/seantempesta/expo-cljs-template/ https://www.npmjs.com/package/create-expo-cljs-app
hadils 2021-05-17T02:33:10.394600Z

Hi I am desparate. I am writing a React Native app in Fulcro (I know there's a Fulcro channel, please keep reading). I am trying to do an image upload and I have tracked the problem down to the fact the the middle is formatting the FormData correctly, but the data going across the wire have mutlipart/form-data but the image/jpeg part is empty. I don't know how to solve this. This is not a Fulcro issue because I have traced the Fulcro library code to this FormData object. I am using an iOS simulator and have remove the Flipper pod to the best of my knowledge, but it still does not work. Any feedback would be greatly appreciated!!!

😕 2
wilkerlucio 2021-05-17T18:56:23.395200Z

without knowing anything about your specific setup, a simple way to handle uploads in Fulcro without having to tap on custom remotes is to encode the image as base64 and send as a normal string

wilkerlucio 2021-05-17T18:57:01.395400Z

or make it a completly separate part of the process, for example, if uploading to S3, you can do the regular upload first, get the final URL from it, and them save that

wilkerlucio 2021-05-17T18:57:38.395600Z

also posting on #fulcro instead of here will show up for more people that have the Fulcro context 😉

hadils 2021-05-17T19:48:31.395800Z

Thank you @wilkerlucio. I will probably use base64.