gotsunami / go-cloudinary

A Go client library and CLI tool to upload static assets to the Cloudinary service.
MIT License
48 stars 53 forks source link

Request error: 400 Bad Request #7

Closed LFerrolho closed 7 years ago

LFerrolho commented 7 years ago

Hi, I'm trying to use this library to upload images to cloudinary. At the moment I'm getting a Request error: 400 Bad Request. What I'm doing is:

service, err := cloudinary.Dial("cloudinaryinfogoeshere")
    if err != nil {
        flash.Error("An error has occured! :( Please, try again later")
        flash.Store(&c.Controller)

        log.Println("EDIT_POST_ERROR > Error connecting to CDN!")
        return
    }

    service.Verbose(true)
    //service.Simulate(true)

    id, err := service.Upload("", bytes.NewReader(photo), "test", true, cloudinary.ImageType)
    if err != nil {
        log.Println("BLZ")
        log.Println(err)
        return
    }

"cloudinaryinfogoeshere" corresponds to the correct info to connect to my cloudinary account Can someone help me?