Upload image URI


It is possible to send a string with the URI of the image rather than sending FileList object? (without the input type file)

Hi Raul,

Do you mean adding some additional data along with a file upload?


I am talking about Data URI, for example:


I want to upload that image (imageDataURI), this is possible?

I also think that this page is outdated:

1 Like

The page is not outdated, it reflects what the current API supports. Which part do you believe is out of date?

The contents of the file cannot contain the content type, it must contain just the contents of the file.


My console returns: “Error: Backendless.FileService is undefined”

Go to the line 2887 of backendless.js file (“saveFile: function (path, fileName, fileContent, overwrite, async)”)

The correct should be: Backendless.Files.saveFile ()

Am I right?

Yes, you are right. It will be fixed shortly.

This has been corrected. Thank you for bringing it up to our attention.


My console return: Uncaught #<Object> sendEncoded @ backendless.js:2853

var byteArray = new Blob( [“01100110”, “01101111”, “01101111”] );
var savedFile = Backendless.Files.saveFile( “testfolder”, “fox.txt”, byteArray, true);
console.log( savedFile );

I’m doing something wrong?

I think you’re initializing your Blob incorrectly. Try this:


Make sure to put your app id and secret key. Once you run it, open Backendless console and navigate to Files > \testfolder. There should be fox.txt in there.


He keeps giving error. It saves the file only in Google Chrome (with error).

It saves the file on the server when you use Google Chrome? Can you attach a screenshot showing the error?

Yes, only in Chrome. In Firefox and Cordova compiled for Android have not worked.

What does the server respond with?

message: “Corrupted text/plain request. File contents has wrong request body”
code: 6017

Thanks. We will investigate this further.

Thank you Mark.

Hello, Raul!

The issue has been fixed.
Can you please check again and confirm?

with best regards,
Alex Navara

It works in firefox. But now I can not log me in my project, yesterday was working. You changed something in Login?

You cannot login to Backendless console or your application? Please provide steps to reproduce the problem.

var user = Backendless.Data.of(Backendless.User).findById(Backendless.UserService.loggedInUser());

Backendless.UserService.loggedInUser() is not returning the current-user-id, then the findById is giving error.

var user;
user = Backendless.UserService.login( ‘my@mail.com’, ‘123’, true );
console.log(user); /* returns true */
}catch( err ) { }

console.log(‘Backendless.LocalCache’, Backendless.LocalCache.getAll());
/* returns: “Backendless.LocalCache” Object { stayLoggedIn: true, user-token: “9A1DC65D-426D-F88D-FF8E-8DE8B7EC3000” }