10
I am trying to add blueimp File Upload to a MVC application and I'm having problems with receiving the files in the post action(im going for the multi file upload functionality).Can someone please help me figure this out?
In my view i have the following code:
<form id="file_upload" enctype="multipart/form-data" action="Home/SaveFile" method="post">
<input type="file" name="file" multiple="true"/>
<button>Upload</button>
<div>Upload files</div>
</form>
<br />
###############################
<table id="files">
</table>
<button id="start_uploads">Start uploads</button>
<button id="cancel_uploads">Cancel uploads</button>
The JQuery code for blueimp File Upload is the following:
$(document).ready(function () {
$('#file_upload').fileUploadUI({
uploadTable: $('#files'),
downloadTable: $('#files'),
buildUploadRow: function (files, index) {
return $('<tr><td class="file_upload_preview"><\/td>' +
'<td>' + files[index].name + '<\/td>' +
'<td class="file_upload_progress"><div><\/div><\/td>' +
'<td class="file_upload_start">' +
'<button class="ui-state-default ui-corner-all" title="Start Upload">' +
'<span class="ui-icon ui-icon-circle-arrow-e">Start Upload<\/span>' +
'<\/button><\/td>' +
'<td class="file_upload_cancel">' +
'<button class="ui-state-default ui-corner-all" title="Cancel">' +
'<span class="ui-icon ui-icon-cancel">Cancel<\/span>' +