pingdotgg / uploadthing

File uploads for modern web devs
https://uploadthing.com
MIT License
4.26k stars 315 forks source link

uploadthings working in localhost but not working in production in react: client version mismatch #1036

Closed Nischal-Ad closed 4 days ago

Nischal-Ad commented 3 weeks ago

Provide environment information

import { createUploadthing, type FileRouter } from 'uploadthing/express';

const f = createUploadthing();

export const uploadRouter = {
    imageUploader: f({
        image: {
            maxFileSize: '16MB',
            maxFileCount: 10,
        },
    })
        .onUploadError((e) => {
            throw 'There is something problem while uploading the image! please try again later.';
        })
        .onUploadComplete((data) => {
            console.log('upload completed');
        }),
} satisfies FileRouter;

export type OurFileRouter = typeof uploadRouter;

   <UploadButton
            endpoint="imageUploader"
            onClientUploadComplete={(e) => {
              setImage(e?.[0]?.url)
              setLoading(false)
            }}
            onUploadError={() => {
              notifyError(
                'Something went wrong while uploading the image! Please try again.'
              )
              setLoading(false)
            }}
            onUploadAborted={() => setLoading(false)}
            onUploadBegin={() => setLoading(true)}
          />

Describe the bug

I am using "uploadthing": "^7.1.0", package at both frontend and backend and it works fine in localhost i can upload image but while in production it says client version mismatch {"message":"Client version mismatch"}

Link to reproduction

https://rental-frontend-lvq3.onrender.com/services

To reproduce

goto: services-> add vehicle-> add image

Additional information

No response

๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing

Code of Conduct

juliusmarminge commented 2 weeks ago

your server logs should say what exact versions it detects

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had any activity for 10 days. It will be closed in 5 days if no further activity occurs.

github-actions[bot] commented 4 days ago

This issue has been closed because it has not had any activity for 5 days since being marked as stale.