File Upload error

I am using code written here

and i am getting error

Uncaught [object Object]
send @ backendless.min.js:2

How to solve this?

Please provide code you are using to upload file

var callback = {};


		callback.complete = function(result)
		{	
			alert( "File successfully uploaded. Path to download: " + result.fileURL );
		}
		callback.fault = function(result)
		{	
		   alert( "error - " + result.message );
		}
		Backendless.Files.upload( files, "folder-name", callback );

You’re doing it wrong.

There are no complete callback. Use success instead. Where did you get this example?
Basically it should look like

function uploadFileFunc() {
 var callback = {};
callback.success = function(result) {
 alert( "File successfully uploaded. Path to download: " + result.fileURL );
 }
 
 callback.fault = function(result){
 alert( "error - " + result.message );
 }
 
 Backendless.Files.upload( files, "my-folder", callback );

Stanislaw

Still getting same error.

Please show how you sending file (how you processing it before you pass to Backendless file upload function).
Also check our example of file upload from Console → Codegen section, (choose JavaScript, select File Service and click download).