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

That was a concious change we made — it was considered a security risk to take the file name provided in the Content-Disposition header field and so instead we now compute a file name which is what you are seeing.

If you want to control the server local file name yourself then you can derive from MultipartFormDataStreamProvider and override GetLocalFileName to provide whatever name you want. Note though that there may be security considerations doing so.

Hope this helps,

Henrik

Leave a Comment