• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Problem with API Base64 Upload

Manuel

Chevereto Member
I have a problem with the API upload and was not able to fix it in many hours.
Maybe you can and want to help me.

So i try to upload an image which i encoded in a Base64 String and i always get the error Can't create image from source. (I use POST)

If i try to upload an image from a website then it works but not with the base64 String of local files.
This is a base64 String i use for example:
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAzAGMDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQD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CY6LjgEc1Z8U6vjww17pE/2qSO/tosWk65dhcxq0e7IAJ5UgkdSDWzHo+mRapJqkem2aahKu2S7WBRK444L4yRwO/YU6LS9Phtvs0VhaxwGXzvKSFQvmbt27GMbtw3Z655o6Lyt+BXW/mcWfEGoWPh+yurB5dR1bV74wyLINy2sgVy0SxPJGBt8vZt3qScscngvvPE/iyKLSrBdFEesXSTyyL5cUg2RsqghDcooLBwxAlYr0+bOR1txomk3cd1Hc6XZTJdsrXKy26MJiuNpcEfMRgYz0xUUvhvQp9Nh02bRdOksIW3RWr2qGJDzyqYwDyeg7mgRzGo+JvE1vFdy+RpdgbDSItQuoboNKfMJl3RBlcKB+7+9zj0bPFa/wDFZPiqG6Q6pHb2UsFvNEltObc+Yv70u6r5YKb4j8xBGxvXnpW8H6PLr66pcafYzCG2ht7SKS0Q/ZvLZ2BQn7v3xwAMbR+Gs2nWL2s9q9nbtb3BYzRGJSkhb724Ywc989afW/8AX9WB9l/Wi/Uy7zwf4ZvruW6u/DmkXFxK26SWWxjd3PqSVyTRTrjwb4WvLiS4ufDWjzzyNueWWxiZmPqSVyTRXO6Tb3Hc26KKK3EFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/w==


I am doing this with Visual Basic (something like C#).
Maybe u already know what i do wrong or you have an idea what i have to observe, if not you maybe understand a little bit of the vb.NET Code i'm using to do this:

Code:
Dim Request As HttpWebRequest = CType(WebRequest.Create("http://mywebsite.net/api/1/upload/?key=myAPIKey&format=redirect"), HttpWebRequest)
        Request.Method = "POST"
        Request.ContentType = "application/x-www-form-urlencoded"
        Request.AllowAutoRedirect = True

        Dim Post As String = ""

//Get the Bytes of the Image
        Dim memory As New System.IO.MemoryStream()
        m_image.Clone.Save(memory, Imaging.ImageFormat.Jpeg)
        Dim imageBytes() As Byte = memory.ToArray()
        memory.Close()

//Convert the Bytes to base64
        Dim base64String As String = Convert.ToBase64String(imageBytes, 0, imageBytes.GetUpperBound(0))

        Post = "&source=" & base64String

// If i do this it works: Post = "&source=http://somewebsite.com/image.jpg"

        Dim byteArray() As Byte = Encoding.UTF8.GetBytes(Post)
        Request.ContentLength = byteArray.Length
        Dim DataStream As IO.Stream = Request.GetRequestStream()
        DataStream.Write(byteArray, 0, byteArray.Length)
        DataStream.Close()
        Dim Response As HttpWebResponse = Request.GetResponse()
        DataStream = Response.GetResponseStream()
        Dim reader As New IO.StreamReader(DataStream)
        Dim ServerResponse As String = reader.ReadToEnd()
        reader.Close()
        DataStream.Close()
        Response.Close()

        MessageBox.Show(ServerResponse)


It is ok if you can't help me, maybe i am able to fix this in some more days of work 😉




 
System triggers an error because the base64 image string is decoded to a JPG image which has issues:

Code:
Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in C:\www\app\lib\classes\class.imageresize.php on line 220

Code:
Warning: imagecreatefromjpeg(): 'C:/Windows/Temp/54881372c1ed.jpg' is not a valid JPEG file in C:\www\app\lib\classes\class.imageresize.php on line 220
 
Thanks for the quick answer.

Do you maybe have a working base64 string which i can use to try to upload it with my program?
I found this site to make base64 string: http://www.base64-image.de/
iVBORw0KGgoAAAANSUhEUgAAARUAAAAnCAYAAAAhK9zwAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAArrAAAK6wGCiw1aAAAAB3RJTUUH3gwbEhsNbi0qWQAADrRJREFUeNrtXH1wFNeR734zu5JXH8YGFAFxgo1hBRUB5sCfwJHzVcAfwbEp+5LYFaecu3Mud+XExHhlIGfFOWEJxyYucsEkKdtlu3xl4yjnGHLnBCeEj+NsBEZShAQifES2tAaxIGm/Zmde9/2hWW5Yr1ar3VmVHN6vSsXO8F7Pe939+nX39BsABQUFBQUFBQUFBQUFhXQIhULlUsp7iOhlImomoiARJYjoI/t6k2VZd7a1tXn+kuYtpQwQUZ+UMnCxyl5K+T0i6pdSrr5YeUBEtTYP1iprkCeCwaBPSrmWiPo5CxBRl5TyoaamJv0vRJnC9rzCF/GCiigeUNTmQVRZhTyQSCTmEtFJzgFE9K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ezkyZNjQohvmqZZbRvc95k5ZPMkyMy/JaJvh0Khz2qa9mqGhbXauanY431yhHKNMPNRZn5RSnmLEGJRUVHR0WzmUQhdyXKcS4UQS4qLi49nCPseYOZ37H7vGIbxQBaG6mCaHEqEGXYB0V2HG6ov2Kw61s+pB6DPM/NWZjg7eLIa/ghA3xXHOpanfZtUP/tnwPQ1AH6PGS44T9TRMOc1AfJaZv4FA4cA2GCGPzLwKivywc3MsB+Y9xUk/PkkwI1QQUFBIX8IxQIFBQVlVBQUFJRRUVBQUEZFQUFBQRkVBQUFZVRcgaOmI6bEqqCgjIob+KFdQ9GgxKqgoKCgoKCgoKCg8HH8H/VhLqr2jlmUAAAAAElFTkSuQmCC

I made one but with that String i get the same error.
Maybe there is something wrong in my vb.NET Code.
 
I also use that website. Problem is how the source image is being made, which in this case reveals a not 100% GD library compatible image. This means that the base64 image (which is just a representation) is also invalid as an image. Anyway, this image is validated:

iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNC8wOC8xNDFQHsQAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAFfElEQVRoge1bPWwaZxh+fAWCza9jGSs6KhslcuWYwe5gMrRKZBVliaXIDJaSJd4y0S0e6sGDMzSjl3YrHWolA1Ykd4ls5UftYFjwkBoJWYJInCKDHMDHEQIn0wFDMHffd3cWCdLBM96938/zfe8/3ECtVgMAXHv2bgLAGoC7ABzQBwoAngNYO1waTwHAQK1Ww7Vn72YAvIZ+iLajAODW4dL4/sDVp6kJAPvQL9kGCgBmGNTVWO9kgTrHNQZ1m+0V3GXQG7fbgIPp9g6+NvqE9Y4+Yb2jT1jvMHR7Aw0EPFb42UHYTQzSgohwUkAkU+74OgNXn6ZqHZ9VA/zsEFZnh8FapGe/Ej1GOFns6HpdVeknvhH89sOoL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QAZwmlBBCeIxBTOZmSwffsKQgn+XD7tZ4fgZwcl41qrKlp9TMuStDrSUIIn/kQjyyqU4PGLQoLwYNKmaJ+NbEtNyneQIzssLdhKFbEe+0B8L3t04WRR1SZpCCV43G+plwEgniPPSTOlExU9bKBOVi6dbYUs4ZMzm+Mv0PXnBBH3Xx1hPfZBkpXRDpHWp1bKk/nqKR7HcopkAYqXjucruLnNKXrWBqLZMlaix7j5N0cML2lBlM2K4vkKNekIJ4vEfWylilh48R5/qMylVXUt3RYD/OwQfK5L5xzIXuYTOEHETrqk6Tcgn8vcTCTiuYqkmaBm3EV74F3/Qfxro+f+49EnrHf0CesdfcJ6B4P6xw+9ggKD+nc9vYLnja9aeuGWCwDWmLMvtm5B36QbH2qlGAA4XBrfBzAD4E/oi3gBdU4zZxzxP9QvNy+KyUP2AAAAAElFTkSuQmCC
 
I don't know, nothing is working, maybe something is wrong with the bytes i get.
Dim byteArray() As Byte = Encoding.UTF8.GetBytes(Post)

Shouldn't it be possible to upload a local file with a path too?
When i try that i get the error: Invalid base64 String.

If not then i will try some more things to get it work with base64 strings.
 
Well, you can also use the good old _FILES. If you send the source as a _FILES object it will work. Not need to convert to base64.
 
Hey, i just want to tell you that everything is working now when i send it as a _FILES object.
Thank you and a happy new year 😉
 
Back
Top