Upload file - A server error occurred while uploading the file

Upload file - A server error occurred while uploading the file

neemevlneemevl Posts: 2Questions: 1Answers: 0

I seem not to get the file upload work by the samples and manual. I read also forum posts and looked at samples.
1. The file gets actually loaded fine.
2. The server response headers are 200:OK - no server error
3. In the editor uploadXhrError is invoked by xhr.responseText is empty

My code returns the json:

{ "data": [], "files" : {
"work2tablefiles" : {
"1" : {
"filesize" : "9317",
"id" : "1" ,
"filename" : "lumber1.jpg",
"web_path" : "/UploadedFiles/Work2Table_2_Pilt_1_lumber1.jpg"
}
}
},
"upload" : {
"id" : "1"
}
}

But the editor still shows that error

Answers

  • neemevlneemevl Posts: 2Questions: 1Answers: 0

    I got it work finally myself. I added pieces by piece to the JSON return according other forum posts until I reached to editor.on('uploadXhrSuccess') invoke. Seems indeed that data[] is also needed.

Sign In or Register to comment.