breadit icon indicating copy to clipboard operation
breadit copied to clipboard

Might be error from UploadThing or Editorjs

Open Nith567 opened this issue 2 years ago • 6 comments

When i am trying to upload an image or post a link, its comes up and says :"Couldn’t upload image. Please try another."(for an image)

Nith567 avatar Jun 28 '23 15:06 Nith567

same problem started to happen

Avijit-Sarkar avatar Jun 29 '23 19:06 Avijit-Sarkar

That's not good, might be something UploadThing or EditorJS have changed under the hood

joschan21 avatar Jul 03 '23 12:07 joschan21

I have just finished the whole video and not getting the error you should reevaluate your code.

SaiSawant1 avatar Jul 05 '23 21:07 SaiSawant1

Either downgrade upload-thing to version 4.x
npm install [email protected]

Or use the latest documentation as things changed in version 5.0.0

ryanyogan avatar Sep 16 '23 15:09 ryanyogan

Yes I am getting this same issue. Will look into the documentation or downgrade as you have suggested

krsnamara avatar Apr 12 '24 04:04 krsnamara

Looking at the error message I opened up an internal file and found that uploadthing is just S3 under the hood. Going to get back to it tomorrow and add either S3 or supabase as the image storage function and toss uploadthing.

Image Tool: uploading failed because of TypeError: Cannot read properties of undefined (reading 'map')
    at uploadFilesInternal (index.js:168:27)
    at eval (index.js:234:9)
    at Object.uploadByFile (Editor.tsx:72:50)
    at eval `(bundle.js:10:35524)
// Get presigned URL for S3 upload
    const s3ConnectionRes = await reportEventToUT("upload", {
        input: "input"in opts ? opts.input : null,
        files: opts.files.map((f)=>({
            name: f.name,
            size: f.size,
            type: f.type
        }))
    });    

krsnamara avatar Apr 12 '24 04:04 krsnamara