Server side to upload file through jQuery Ajax

52 views Asked by At

I am trying to upload a blob, but am unable to figure out server side code for the same. Kindly explain how the server will act to this and provide appropriate code. I am working with Orbit server (Lua based). However, code in any language will be helpful.

In my current code, the alert for "Start" is displayed and then nothing happens. Nothing happens, neither on server or the client. Alerts for "End" and "Saved" are also not displayed.

var fd = new FormData();
fd.append("filedata",blob);
alert("Start");

$.ajax({
    type: "GET",
    url: "convert",
    data: fd
}).done(function(o) {
    alert('saved'); 
});

alert("End");
0

There are 0 answers