Question

I have a Kendo file upload call, here is the function:

  $("#fileUpload").kendoUpload({
    async: {
        saveUrl: "/people",
        autoUpload: true
    },
    multiple: false,
    complete: onComplete
});

function onComplete(e) {
    // The upload is now idle
    dataSourcePerson.read();
}

This calls the play routes file which triggers this method in my controller:

  public static Result create() {
     // Do some stuff
     return ok("Successfully loaded new users");
  }

My problem is that the upload box shows failure and a retry option even though the upload was a success. What should my create() method return?

Was it helpful?

Solution

I figured it out, I needed to respond with:

  return ok("{\"status\":0}");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top