414 Request-URI Too Large 414 HTTP/1.1
Hi, i get Request-URI Too Large on image upload request
The image is in base 64, I already upload other images without errors
The length of string in base64 is 26667
Complete message:
{414 Request-URI Too Large 414 HTTP/1.1 1 1 map[Content-Type:[text/html] Date:[Mon, 03 Dec 2018 06:08:27 GMT] Server:[cloudinary] Content-Length:[186] Connection:[keep-alive]]
Im upload from golang, the code is:
req, err := http.NewRequest("POST", "https://api.cloudinary.com/v1_1/xperiafan13/image/upload", nil)
q := req.URL.Query()
q.Add("timestamp", fmt.Sprintf("%d", now.Unix()))
q.Add("public_id", file)
q.Add("api_key", "67xxxxxxxx")
q.Add("file", b64)
q.Add("signature", sign)
req.URL.RawQuery = q.Encode()
if err != nil {
fmt.Println(err.Error())
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
resp, err := http.DefaultClient.Do(req)
if err != nil {
fmt.Println(err.Error())
}
defer resp.Body.Close()
Please sign in to leave a comment.
Comments
1 comment