upload file using jquery and handler(ashx)

后端 未结 3 943
小蘑菇
小蘑菇 2020-12-29 13:27

I am trying to upload a file using jquery ajax with handler (c#). The problem is, when I call the handler I get

context.Request.File.Count=0
3条回答
  •  抹茶落季
    2020-12-29 13:43

    i think the problem is with the contentType try

    contentType: 'multipart/form-data',
    

    OR

    contentType :'application/octet-stream';
    

    see this post for more information

    Sending multipart/formdata with jQuery.ajax

提交回复
热议问题