ASP.NET Web API File saved as “BodyPart_3ded2bfb-40be-4183-b789-9301f93e90af”

前端 未结 3 1717
面向向阳花
面向向阳花 2020-12-08 06:55

I\'m uploading files using the ASP.NET Web API. I\'ve done this before the RC but for some reason the file is being saved as \"BodyPart_3ded2bfb-40be-4183-b789-9301f93e90af\

3条回答
  •  猫巷女王i
    2020-12-08 07:36

    I updated the code for the tutorial to make it work with ASP.NET Web API RC. Indeed, as Henrik mentioned Content-Disposition is no longer used a file name. See the source files at the bottom of the post - http://www.strathweb.com/2012/04/html5-drag-and-drop-asynchronous-multi-file-upload-with-asp-net-webapi/

    Please note, that there are further changes to MultipartFormDataStreamProvider that didn't make the cut to the RC, so it's now even more flexible. Henrik blogged about those here - http://blogs.msdn.com/b/henrikn/archive/2012/04/27/asp-net-web-api-updates-april-27.aspx.

    EDIT: I have blogged about new and improved way of uploading files in Web API RTM, so that should hopefully help gets things organized - http://www.strathweb.com/2012/08/a-guide-to-asynchronous-file-uploads-in-asp-net-web-api-rtm/

提交回复
热议问题