Open mandrillxx opened 1 day ago
we have to do some weird workarounds to get RN blobs to behave. See here for example: https://github.com/pingdotgg/uploadthing/blob/main/packages/expo/src/image-picker.ts#L98-L113
We should "overload" the useUploadThing
hook that's returned from generateReactNativeHelpers
since currently that's forwarded straight from @uploadthing/react
web package
we have to do some weird workarounds to get RN blobs to behave. See here for example: https://github.com/pingdotgg/uploadthing/blob/main/packages/expo/src/image-picker.ts#L98-L113
We should "overload" the
useUploadThing
hook that's returned fromgenerateReactNativeHelpers
since currently that's forwarded straight from@uploadthing/react
web package
this fixed it, thanks
Provide environment information
Describe the bug
manually uploading a file by getting the media path, reading it as base64 and converting to a file to use with uploadthing will produce an image with the size NaNundefined
Link to reproduction
N/A
To reproduce
Additional information
The above code will upload, and by doing a conosle.log of the fileData object it shows this, which looks correct: { "_data": { "blobId": "3f07ab59-e857-4e53-a8ea-cfb7b356b31e", "offset": 0, "size": 346348, "type": "image/jpeg", "__collector": {}, "name": "image.jpg" } }
also, the alert inside onClientUploadComplete does show the size as 346348, however the image shows up like this https://utfs.io/f/L1LEbSwZ6Eu7mwXSfb15iPMagyczdEQsHt9nKIZGR6m7AhFo with a size of NaNundefined
👨👧👦 Contributing
Code of Conduct