I'm using this plug-in : http://hayageek.com/docs/jquery-upload-file.php
I'm use it to send files to a WCF Rest Service and save its on hdd.
Uploads works fine, but the problem is that images, exe, etc. Uploads broken. If I open uploaded files with a text editor, I can see unwanted strings
At begin:
------WebKitFormBoundaryPUTfurckDMbpBxiw Content-Disposition: form-data; name="file"; filename="image.png" Content-Type: image/png
At end:
------WebKitFormBoundaryPUTfurckDMbpBxiw--
My service code:
<OperationContract()>
<WebInvoke(ResponseFormat:=WebMessageFormat.Json, Method:="POST", UriTemplate:="GetFile?fileName={fileName}&accion={accion}")>
Function GetFile(str As Stream, fileName As String, accion As String) As String
Try
Dim absFileName As String = "C:\inetpub\wwwroot\UploadedComponents\" & fileName
Using fs As New FileStream(absFileName, FileMode.Create)
str.CopyTo(fs)
str.Close()
End Using
Return "Upload OK"
Catch ex As Exception
Throw ex
End Try
End Function
Any idea to solve that?