Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Best Practice for File Upload

$
0
0

If we using multipart form data parser for uploaded form, then it saves form's files on the drive in selected location, for example like this:

var streamProvider = new MultipartFormDataStreamProvider("c:\\tmp\\uploads");
var bodyparts = await Request.Content.ReadAsMultipartAsync(streamProvider);

Who is responsible for removing temp files, which enumerated in the streamProvider.BodyPartFileNames property? If developer, then how removal process can be implemented in the best way?


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>