Uploader 3.1

i ve just update webix from 2.4 to 3.1 and the uploader doesn’t work pls help:
i m using VB.NET here’s may file handler code:

Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Try
If (context.Request.Files.Count > 0) Then
Dim files As HttpFileCollection = context.Request.Files
Dim filename As String = context.Request.Form.Item(0)
Dim fileId As String = context.Request.Form.Item(1)
For Each key As String In files
Dim file As HttpPostedFile = files(key)
filename = context.Server.MapPath(“Upload/”+ fileId + filename)
file.SaveAs(filename)
Next
End If
Catch ex As Exception
MsgBox(“FileHandler Exception ! " + ex.ToString)
End Try
context.Response.ContentType = “text/plain”
context.Response.Write(”{status:‘server’}")
End Sub

it save the file but i get in webix an error, “Error during file upload”
this always worked with 2.4 version
Thanks

Hi,

Please correct the format of json, a key and a value should be in double quotes:

context.Response.Write(’{“status”:“server”})

Ok i’ve put double quotes but is still not working,

the problem is that the file is uploaded in my folder but i get the

“Error during file upload” anyway

but i get the “Error during file upload” anyway

Did you mean that onFileUploadError event is called ? Or was it an error message shown in browser’s dev tools?

3.1 version requests correct JSON format as the response. You can use JSONLint to check whether the string that your server-side returns is in a correct json format.

onFileUploadError event is called but my file is uploaded correctly and my json format is correct too. i don’t know what to do

Can you share a link to some demo, where issue can be checked ?

i have this:
http://webix.com/snippet/0847cd67
my file is saved correctly but i get onFileUploadError like it was returned status:error i think
Thanks guys and sorry but i’m pretty new on this things

JSON output is still invalid, please change it to be

{ "status":"server" }

JSON spec requires double quote usage, and JSON parser will not be able to parse strings if you are using single quote as in your original code.

Im using visual basic so i use
context.Response.Write("{"""“status”""":"""“server”"""}")
that correspond to { “status”:“server” } but is still not working

Im using visual basic so i use context.Response.Write("{"“status”":"“server”"}") that correspond to { “status”:“server” } but is still not working please help me, i cant use webix 3.1 and i’m stuck to 2.4 version

Sorry problem solved!!!