Unable to upload image through programmatic upload API

dongqtm
dongqtm Member Posts: 4

Hi!

I have been able to upload images through programmatic upload API before. However, there is one image that keep giving me "Invalid image file". The file is a GIF file so it should be a valid image file. I am able to upload this in other services, but doesn't work through cloudinary upload API for some reason. I also set the proper resource type as "resource_type : image"

I attached the file in this question.


It can also be accessed here


The code that I use for the upload is (in javascript)

    return new Promise((resolve: any, reject: any) => {
      cloudinary.uploader.upload(fileName, { resource_type: "image"}).then(async (result) => {
        if (result.secure_url) {
          resolve(file)
        }
      }).catch((error) => {
        reject(error)
      })
    })

Any help would be very appreciated. Thank you so much!

Answers

  • tia
    tia Member, Cloudinary Staff Posts: 24

    Hi there,

    Thanks so much for reaching out.

    Unfortunately, I'm not seeing the file. Could you try sending that along one more time? Can you also share your cloud name with me, so that I can look into our logs to help debug the issue? Are you using our SDK? And finally - are you getting any console errors? If so, can you please share them?

    I look forward to your reply.

    Kind Regards,

    Tia

  • dongqtm
    dongqtm Member Posts: 4

    Hi!

    Please see the link below for the file


    "https://arweave.net/AGEG8d9MD-aKUFuv9P_ru39Eva8S_4hsLEF3NSpC804"

    The console error I am getting is `Invalid image file`


    Thank you so much!