Uploadthing: Type-error when sending custom field data to the client
So i want to send some data down to the client upon image upload.
api/uploadthing.core.ts
type-error
The imagesArr
is what i want on the client as I loop
over imagesArr
to render all the images.
[Important Point]: In the backend all the images are uploaded successfully and in the right size as well
-------------
8 Replies
In simple terms i want to send additional content in
onUploadComplete
and use it onClientUploadComplete
but it gives me a type-error
when i do so.
It only allows this to be returned without any errors
Can you confirm which uploadthing package versions you are using?
Solution
"uploadthing": "^7.4.4",
"@uploadthing/react": "^7.1.5",
thanks for the solution
but i guess i have to wait until these changes are reviewed and merged https://github.com/pingdotgg/uploadthing/pull/1115
GitHub
chore(release): 📦 version packages by t3dotgg · Pull Request #1115...
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're ...
There is a pkg.pr that you can use in the interim: https://github.com/pingdotgg/uploadthing/pull/1127#issuecomment-2584085766
GitHub
fix: allow nested objects in
JsonArray
type by juliusmarminge · P...Summary by CodeRabbit
New Features
Enhanced JSON array handling to support deeply nested objects
Expanded test coverage for complex data structures in upload functionality
Bug Fixes
Patched ...
I’ll probably cut the release no later than Monday though
thank you
i just got out of tutorial hell (or atleast trying to) so everything is new to me