However, the documentation is a little terse and there are no MVC integration guides yet, so let me present a sample Controller Action for anyone who wants to simply see how to use it.
public string UploadFile()
{
string errorMessage = "";
foreach (var fileKey in Request.Files.AllKeys)
{
var file = Request.Files[fileKey];
try
{
if (file != null)
{
YourInputStreamSaveMethod(file.FileName, file.InputStream);
// Hint, google the phrase 'save inputstream file .net'
}
}
catch (Exception ex)
{
errorMessage = ex.Message;
}
}
if (errorMessage != "")
{
Response.StatusCode = 418; // Teapot Fail!
}
return errorMessage;
}
Hello friend How i can ingrate dorpzone jquery with existing from have many inputs in asp.net mcv
ReplyDelete