Just getting start with the Files API in javascript, so created some test pages before using it in my app.
I am using the code form this page: File Upload - Backendless SDK for JavaScript API Documentation
if(fileList != null){
Backendless.Files.upload( fileList, "uploads" )
.then( function( fileURLs ) {
console.log( "File successfully uploaded. Path to download: " + result.fileURL );
})
.catch( function( error ) {
console.log( "error - " + error.message );
});
}
Whenever I run it I am getting the error “result is not defined”. However the file is being uploaded.
Any idea what I might be doing wrong?