Why is it that when i upload a byte array (string) encoded as a Base64 string using POSTMAN the uploaded file is just 3KB in size but when i upload the same file from an android client using REST api the upload file size is a whooping 571KB?
I am making an asynchronous HTTP request to thebackendless server using RxJava and Retrofit as below
Single<String> uploadFileFromByteArray(@Body String base64ImageString, @Path("fileName") String fileName);
I’ve tried load file to your app with curl and with Android-sdk (Backendless.Files.upload( )) – all files have the same size.
Also, i tried with simple URL/URLConnection, and i didn’t make any encode/decode operations, they are not necessary.
Also pay attention to the “Content-Type” header. It should be like in documentattion:
Am using SAVE BYTE ARRAY DOCUMENTATION, just below what you sent. See attached
Hi again George,
Did you compare the actual content of both files you uploaded via Postman and Java?
P.S.: Making the call using Retrofix?
Hi Anton, i succeeded getting desired file sizes using the file-upload api as opposed to saving file from byte array.
You can close the topic.