sudhanshug
Explore posts from serversTTCTheo's Typesafe Cult
•Created by sudhanshug on 11/4/2024 in #questions
[Expo + UT] Error when importing @uploadthing/expo
38 replies
TTCTheo's Typesafe Cult
•Created by sudhanshug on 10/21/2024 in #questions
[Rails + UT] How to use UploadThing outside of JS ecosystem, using Rest API?
Hey, I am building file upload functionality for my Expo+Rails app. I was hoping to use UploadThing for it's robust FE library and the managed s3 experience.
Firstly, the docs aren't friendly for non-JS folks, please look into that - a lot of contradicting/variety of information.
I am calling the
/v6/prepareUpload
endpoint in my /api/uploadthing
api controller but it is not returning presigned urls as one would hope reading the REST api docs. Here is the shape of the output:
I am using expo in the FE, here is the code that calls my /api/uploadthing
api:
My understanding is that the response of prepareUpload should be the result of my uploadthing controller and the FE library will read it and take care of the direct upload.
Please advise what can be done here.132 replies