I create this code to upload multi-files it works in Firefox, chrome, opera and safari but now internet explorer. I can select however many files I want.
It uploads and save on my server but IE on let me do one.
How can I fix this without adding additional input controls. I logon Yahoo mail and it works in IE. I need this effect.
<input type="file" name="files" id="files" multiple="multiple"/> work for every other browser but IE. I care deeply for microsoft so they need to incorporate this attribute. multiple="multiple" how much code will the need to write to fix this.
Internet Explorer doesn't currently support multiple file uploading. You may have to consider using an alternative solution, such as uploading using an ActiveX (like
this one) or Flash-based solution (like
SWFUpload) (it's a browser issue - not any type of functionality-fixable issue).
There are alot of jQuery plugins out there that will work with E uploadify being a nice one
http://www.uploadify.com/demos/. Sounds like the one your using just dont play well with IE is all.
Present I have a form that uploads one file in IE, but in chrome and firefox it can uploads multiple files an store file path in the database and upload other files to dynamic folder created.
With this code it fires and upload file on select files.
I understand this awesome, How do I use this with a form to submit data into a database.
Your controller will then look soemthing like this:
public string Upload(HttpPostedFileBase fileData)
{
var fileName = this.Server.MapPath("~/uploads/" + System.IO.Path.GetFileName(fileData.FileName));
fileData.SaveAs(fileName);
// Add your code to add some data to the database...
return "ok";
}
postonoh
Member
498 Points
259 Posts
Multiple file upload problems
Apr 19, 2012 07:22 PM|LINK
I create this code to upload multi-files it works in Firefox, chrome, opera and safari but now internet explorer. I can select however many files I want.
It uploads and save on my server but IE on let me do one.
How can I fix this without adding additional input controls. I logon Yahoo mail and it works in IE. I need this effect.
<input type="file" name="files" id="files" multiple="multiple"/> work for every other browser but IE. I care deeply for microsoft so they need to incorporate this attribute. multiple="multiple" how much code will the need to write to fix this.
really.
Rion William...
All-Star
27364 Points
4542 Posts
Re: Multiple file upload problems
Apr 19, 2012 07:26 PM|LINK
Internet Explorer doesn't currently support multiple file uploading. You may have to consider using an alternative solution, such as uploading using an ActiveX (like this one) or Flash-based solution (like SWFUpload) (it's a browser issue - not any type of functionality-fixable issue).
postonoh
Member
498 Points
259 Posts
Re: Multiple file upload problems
Apr 19, 2012 07:42 PM|LINK
I believe you. how do intergret with mvc
Rion William...
All-Star
27364 Points
4542 Posts
Re: Multiple file upload problems
Apr 19, 2012 07:53 PM|LINK
You can find a tutorial on integrating Uploadify into MVC at the following link, which should hopefully solve your problem:
Multiple File Uploading in MVC using Uploadify
It should handle what you need - the tutorial is fairly in-depth and fixes many of the short comings traditionally found with using Uploadify and MVC.
jprochazka
Contributor
4876 Points
740 Posts
Re: Multiple file upload problems
Apr 19, 2012 08:00 PM|LINK
There are alot of jQuery plugins out there that will work with E uploadify being a nice one http://www.uploadify.com/demos/. Sounds like the one your using just dont play well with IE is all.
Rion beat me to the point :)
postonoh
Member
498 Points
259 Posts
Re: Multiple file upload problems
May 04, 2012 04:27 PM|LINK
Present I have a form that uploads one file in IE, but in chrome and firefox it can uploads multiple files an store file path in the database and upload other files to dynamic folder created.
With this code it fires and upload file on select files.
I understand this awesome, How do I use this with a form to submit data into a database.
jprochazka
Contributor
4876 Points
740 Posts
Re: Multiple file upload problems
May 04, 2012 07:16 PM|LINK
Do a search for "uploadify asp.net mvc example".
This is very rough but should give you an idea.
Your javascript code should look something like this:
<script type="text/javascript"> $(window).load( function () { $("#fileuploader").fileUpload({ 'uploader': '/Scripts/uploader.swf', 'cancelImg': '/Images/cancel.png', 'buttonText': 'Select Image', 'script': 'Home/Upload', 'folder': '/uploads', 'fileDesc': 'Image Files', 'fileExt': '*.jpg;*.jpeg;*.gif;*.png', 'multi': true, 'auto': true }); } ); </script>Your controller will then look soemthing like this:
public string Upload(HttpPostedFileBase fileData) { var fileName = this.Server.MapPath("~/uploads/" + System.IO.Path.GetFileName(fileData.FileName)); fileData.SaveAs(fileName); // Add your code to add some data to the database... return "ok"; }Good Luck!
postonoh
Member
498 Points
259 Posts
Re: Multiple file upload problems
May 04, 2012 07:35 PM|LINK
I was looking for something like this just get to work.
<script type="text/javascript"> $(function () { $('#files').uploadify({ 'swf': '@Url.Content("~/Scripts/uploadify/uploadify.swf")', // 'uploader': '@Url.Action("Patients","Doctors")', 'cancelImage': '@Url.Content("~/Scripts/uploadify/cancel.png")', 'checkScript': '@Url.Content("~/Scripts/uploadify/uploadify-check-exists.php")', 'script': $('form').attr('action'), 'multi': true, 'auto': true, 'queueID': 'custom-queue', 'removeCompleted': false, 'onDialogClose': function (queue) { $('#status-message').text(queue.filesQueued + ' files have been added to the queue.'); }, 'onQueueComplete': function (stats) { $('#status-message').text(stats.successful_uploads + ' files uploaded, ' + stats.upload_errors + ' errors.'); } }); $('form').submit(function () { $('#files').uploadifySettings('scriptData', { thisGuid: $('#id').val() }); $('#files').uploadifyUpload(); return false; }); }); </script>@using (Html.BeginForm("Patients", "Doctors", FormMethod.Post, new { enctype = "multipart/form-data" })) { @Html.ValidationSummary(true) <fieldset> <table> <tbody> <tr> <th colspan="9">Client Information</th> </tr> <tr> <td colspan="1">@Html.LabelFor(m => m.ClientID)@Html.TextBoxFor(m => m.ClientID, new { @style = "width:150px;" })</td> <td colspan="1">@Html.LabelFor(m => m.DOB)@Html.TextBoxFor(m => m.DOB, new { @style = "width:100px;" })</td> <td>@Html.LabelFor(m => m.Gender)@Html.DropDownListFor(m => m.Gender, new List<SelectListItem> { new SelectListItem { Text = "Female" }, new SelectListItem { Text = "Male" } })</td> <td>@Html.LabelFor(m => m.Handedness)@Html.EditorFor(m => m.Handedness)</td> </tr> <tr> <td>@Html.LabelFor(m => m.RecordingDate)@Html.TextBoxFor(m => m.RecordingDate, new { @style = "width: 100px;", @class = "datepicker" })</td> <td>@Html.LabelFor(m => m.TimeRecording)@Html.TextBoxFor(m => m.TimeRecording, new { @style = "width: 100px;" })</td> <td>@Html.LabelFor(m => m.EO)@Html.CheckBoxFor(m => m.EO)<br />@Html.LabelFor(m => m.EC)@Html.CheckBoxFor(m => m.EC)</td> <td>@Html.LabelFor(m => m.Task)@Html.TextBoxFor(m => m.Task, new { @style = "width: 150px;" })</td> </tr> <tr> <td>@Html.LabelFor(m => m.Referred_for)@Html.TextBoxFor(m => m.Referred_for, new { @style = "width:100px;" })</td> <td colspan="3">@Html.LabelFor(m => m.Evaluation_Number)@Html.TextBoxFor(m => m.Evaluation_Number, new { @style = "width:100px;" })</td> </tr> <tr> <td>@Html.LabelFor(m => m.Years_of_Education)>@Html.TextBoxFor(m => m.Years_of_Education)</td> <td>@Html.LabelFor(m => m.Marital_Status)@Html.DropDownListFor(m => m.Marital_Status, new List<SelectListItem> { new SelectListItem { Text = "Yes" }, new SelectListItem { Text = "No" } })</td> <td colspan="2">@Html.LabelFor(m => m.Abnormality)@Html.TextBoxFor(m => m.Abnormality, new { @style = "width:250px;" })</td> </tr> <tr> <td>@Html.LabelFor(m => m.Vision)@Html.TextBoxFor(m => m.Vision, new { @style = "width: 150px;" })</td> <td colspan="3">@Html.LabelFor(m => m.Appearance)@Html.TextBoxFor(m => m.Appearance, new { @style = "width: 250px;" })</td> </tr> <tr> <td>@Html.LabelFor(m => m.Sleep_Disorder)@Html.TextBoxFor(m => m.Sleep_Disorder, new { @style = "width:150px;" })</td> <td>@Html.LabelFor(m => m.Accident)@Html.TextBoxFor(m => m.Accident, new { @style = "width:150px;" })</td> <td colspan="2">@Html.LabelFor(m => m.Employed)@Html.TextBoxFor(m => m.Employed, new { @style = "width:150px;" })</td> </tr> <tr> <td colspan="2">@Html.LabelFor(m => m.Veteran)@Html.TextBoxFor(m => m.Veteran, new { @style = "width:250px;" })</td> <td colspan="2">@Html.LabelFor(m => m.Activities)@Html.TextBoxFor(m => m.Activities, new { @style = "width:150px;" })</td> </tr> <tr> <th colspan="8">Medical Backgruound Information</th> </tr> <tr> <td colspan="8"> @Html.LabelFor(m => m.MedicalBackgroundModel.Overweight)@Html.CheckBoxFor(m => m.MedicalBackgroundModel.Overweight) @Html.LabelFor(m => m.MedicalBackgroundModel.Hypertension)@Html.CheckBoxFor(m => m.MedicalBackgroundModel.Hypertension) @Html.LabelFor(m => m.MedicalBackgroundModel.Diabetes) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Diabetes) @Html.LabelFor(m => m.MedicalBackgroundModel.TBI) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.TBI) @Html.LabelFor(m => m.MedicalBackgroundModel.Migraine) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Migraine) @Html.LabelFor(m => m.MedicalBackgroundModel.Thyroid) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Thyroid) @Html.LabelFor(m => m.MedicalBackgroundModel.Stroke) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Stroke) @Html.LabelFor(m => m.MedicalBackgroundModel.Pain) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Pain) @Html.LabelFor(m => m.MedicalBackgroundModel.Tremor) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Tremor) @Html.LabelFor(m => m.MedicalBackgroundModel.Parkinson) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Parkinson) @Html.LabelFor(m => m.MedicalBackgroundModel.Kidney) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Kidney) @Html.LabelFor(m => m.MedicalBackgroundModel.Liver) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Liver) @Html.LabelFor(m => m.MedicalBackgroundModel.Lung) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Lung) @Html.LabelFor(m => m.MedicalBackgroundModel.Heart) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Heart) <br /> <br /> @Html.LabelFor(m => m.MedicalBackgroundModel.Weakness) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Weakness) @Html.LabelFor(m => m.MedicalBackgroundModel.Paralysis) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Paralysis) @Html.LabelFor(m => m.MedicalBackgroundModel.Cerebral_Palsy) @Html.CheckBoxFor(m => m.MedicalBackgroundModel.Cerebral_Palsy) </td> </tr> <tr> <td>@Html.LabelFor(m => m.MedicalBackgroundModel.Prothesis)<br /> @Html.TextAreaFor(m => m.MedicalBackgroundModel.Prothesis, new { @style = "width:350px;" })</td> <td colspan="3">@Html.LabelFor(m => m.MedicalBackgroundModel.Medical_Background_Other)<br /> @Html.TextAreaFor(m => m.MedicalBackgroundModel.Medical_Background_Other, new { @style = "width:550px;" })</td> </tr> <tr> <td colspan="8"></td> </tr> <tr> <th colspan="8">Psychological Condition</th> </tr> <tr> <td colspan="8"> @Html.LabelFor(m => m.PsycologicalModel.ADD) @Html.CheckBoxFor(m => m.PsycologicalModel.ADD) @Html.LabelFor(m => m.PsycologicalModel.ADHD) @Html.CheckBoxFor(m => m.PsycologicalModel.ADHD) @Html.LabelFor(m => m.PsycologicalModel.ADD_ADHD) @Html.CheckBoxFor(m => m.PsycologicalModel.ADD_ADHD) @Html.LabelFor(m => m.PsycologicalModel.Anxiety) @Html.CheckBoxFor(m => m.PsycologicalModel.Anxiety) @Html.LabelFor(m => m.PsycologicalModel.ASD) @Html.CheckBoxFor(m => m.PsycologicalModel.ASD) @Html.LabelFor(m => m.PsycologicalModel.Austism) @Html.CheckBoxFor(m => m.PsycologicalModel.Austism) @Html.LabelFor(m => m.PsycologicalModel.Bipolar) @Html.CheckBoxFor(m => m.PsycologicalModel.Bipolar) @Html.LabelFor(m => m.PsycologicalModel.Dementia) @Html.CheckBoxFor(m => m.PsycologicalModel.Dementia) @Html.LabelFor(m => m.PsycologicalModel.Depression) @Html.CheckBoxFor(m => m.PsycologicalModel.Depression) @Html.LabelFor(m => m.PsycologicalModel.Eating_Disorder) @Html.CheckBoxFor(m => m.PsycologicalModel.Eating_Disorder) @Html.LabelFor(m => m.PsycologicalModel.Insomnia) @Html.CheckBoxFor(m => m.PsycologicalModel.Insomnia) @Html.LabelFor(m => m.PsycologicalModel.LD) @Html.CheckBoxFor(m => m.PsycologicalModel.LD) @Html.LabelFor(m => m.PsycologicalModel.OCD) @Html.CheckBoxFor(m => m.PsycologicalModel.OCD) @Html.LabelFor(m => m.PsycologicalModel.Panic) @Html.CheckBoxFor(m => m.PsycologicalModel.Panic) <br /> <br /> @Html.LabelFor(m => m.PsycologicalModel.PDD) @Html.CheckBoxFor(m => m.PsycologicalModel.PDD) @Html.LabelFor(m => m.PsycologicalModel.Schizophrenia) @Html.CheckBoxFor(m => m.PsycologicalModel.Schizophrenia) @Html.LabelFor(m => m.PsycologicalModel.Seizure) @Html.CheckBoxFor(m => m.PsycologicalModel.Seizure) </td> </tr> <tr> <td colspan="8">@Html.LabelFor(m => m.PsycologicalModel.Psychological_Other)<br /> @Html.TextAreaFor(m => m.PsycologicalModel.Psychological_Other, new { @style = "width:1000px;" }) </td> </tr> <tr> <th colspan="8">Current Mood Information</th> </tr> <tr> <td colspan="8"> @Html.LabelFor(m => m.CurrentMoodModel.Anxious) @Html.CheckBoxFor(m => m.CurrentMoodModel.Anxious) @Html.LabelFor(m => m.CurrentMoodModel.Apprehensive) @Html.CheckBoxFor(m => m.CurrentMoodModel.Apprehensive) @Html.LabelFor(m => m.CurrentMoodModel.Cheerful) @Html.CheckBoxFor(m => m.CurrentMoodModel.Cheerful) @Html.LabelFor(m => m.CurrentMoodModel.Depressed) @Html.CheckBoxFor(m => m.CurrentMoodModel.Depressed) @Html.LabelFor(m => m.CurrentMoodModel.Elevated) @Html.CheckBoxFor(m => m.CurrentMoodModel.Elevated) @Html.LabelFor(m => m.CurrentMoodModel.Euphoric) @Html.CheckBoxFor(m => m.CurrentMoodModel.Euphoric) @Html.LabelFor(m => m.CurrentMoodModel.Fearful) @Html.CheckBoxFor(m => m.CurrentMoodModel.Fearful) @Html.LabelFor(m => m.CurrentMoodModel.Optimistic) @Html.CheckBoxFor(m => m.CurrentMoodModel.Optimistic) @Html.LabelFor(m => m.CurrentMoodModel.Panic) @Html.CheckBoxFor(m => m.CurrentMoodModel.Panic) @Html.LabelFor(m => m.CurrentMoodModel.Pessimistic) @Html.CheckBoxFor(m => m.CurrentMoodModel.Pessimistic) @Html.LabelFor(m => m.CurrentMoodModel.Tearful) @Html.CheckBoxFor(m => m.CurrentMoodModel.Tearful) @Html.LabelFor(m => m.CurrentMoodModel.Tense) @Html.CheckBoxFor(m => m.CurrentMoodModel.Tense) @Html.LabelFor(m => m.CurrentMoodModel.Worried) @Html.CheckBoxFor(m => m.CurrentMoodModel.Worried) </td> </tr> <tr> <th colspan="8">Diet Information</th> </tr> <tr> <td colspan="8">@Html.LabelFor(m => m.DietInformationModel.Alcohol) @Html.CheckBoxFor(m => m.DietInformationModel.Alcohol) @Html.LabelFor(m => m.DietInformationModel.Caffeine) @Html.CheckBoxFor(m => m.DietInformationModel.Caffeine) @Html.LabelFor(m => m.DietInformationModel.Tobacco) @Html.CheckBoxFor(m => m.DietInformationModel.Tobacco) </td> </tr> <tr><td colspan="8">@Html.LabelFor(m => m.DietInformationModel.Diet_Other)<br /> @Html.TextAreaFor(m => m.DietInformationModel.Diet_Other, new { @style = "width:1000px;" })</td></tr> <tr> <th colspan="8">Behavior Information</th> </tr> <tr> <td colspan="2"> @Html.LabelFor(m => m.BehaviorModel.Exercises) @Html.CheckBoxFor(m => m.BehaviorModel.Exercises) @Html.LabelFor(m => m.BehaviorModel.Violent_Offense) @Html.CheckBoxFor(m => m.BehaviorModel.Violent_Offense) @Html.LabelFor(m => m.BehaviorModel.Violent_Victim) @Html.CheckBoxFor(m => m.BehaviorModel.Violent_Victim) @Html.LabelFor(m => m.BehaviorModel.Trauma) @Html.CheckBoxFor(m => m.BehaviorModel.Trauma) </td> <td>@Html.LabelFor(m => m.BehaviorModel.Speech)<br /> @Html.TextAreaFor(m => m.BehaviorModel.Speech, new { @style = "width:250px;" })</td> <td>@Html.LabelFor(m => m.BehaviorModel.Behavior_Other)<br /> @Html.TextAreaFor(m => m.BehaviorModel.Behavior_Other, new { @style = "width:250px;" })</td> </tr> <tr> <th colspan="2">Medications(as many as apply)</th> <th colspan="2">Supplements(as many as apply)</th> </tr> <tr> <td colspan="2">@Html.LabelFor(m => m.MedicationModel.Medication)<br /> @Html.TextAreaFor(m => m.MedicationModel.Medication, new { @style = "width:450px;" })</td> <td colspan="2">@Html.LabelFor(m => m.SupplementInformationModel.Supplements)<br /> @Html.TextAreaFor(m => m.SupplementInformationModel.Supplements, new { @style = "width:450px;" })</td> </tr> <tr> <td colspan="2">@Html.LabelFor(m => m.MedicationModel.MedDosage)<br /> @Html.TextAreaFor(m => m.MedicationModel.MedDosage, new { @style = "width:450px;" })</td> <td colspan="2">@Html.LabelFor(m => m.SupplementInformationModel.SuppDosage)<br /> @Html.TextAreaFor(m => m.SupplementInformationModel.SuppDosage, new { @style = "width:450px;" })</td> </tr> <tr> <th colspan="8">Assessment Available</th> </tr> <tr> <td colspan="4"> @Html.LabelFor(m => m.AssessmentModel.Beck_Despression) @Html.CheckBoxFor(m => m.AssessmentModel.Beck_Despression) @Html.LabelFor(m => m.AssessmentModel.Conners) @Html.CheckBoxFor(m => m.AssessmentModel.Conners) @Html.LabelFor(m => m.AssessmentModel.DSM) @Html.CheckBoxFor(m => m.AssessmentModel.DSM) @Html.LabelFor(m => m.AssessmentModel.IVA) @Html.CheckBoxFor(m => m.AssessmentModel.IVA) @Html.LabelFor(m => m.AssessmentModel.MMSE) @Html.CheckBoxFor(m => m.AssessmentModel.MMSE) @Html.LabelFor(m => m.AssessmentModel.TOVA) @Html.CheckBoxFor(m => m.AssessmentModel.TOVA) @Html.LabelFor(m => m.AssessmentModel.WAIS) @Html.CheckBoxFor(m => m.AssessmentModel.WAIS) @Html.LabelFor(m => m.AssessmentModel.WISC) @Html.CheckBoxFor(m => m.AssessmentModel.WISC) </td> </tr> <tr> <td colspan="4">@Html.LabelFor(m => m.AssessmentModel.Assessment_Other) <br />@Html.TextAreaFor(m => m.AssessmentModel.Assessment_Other, new { @style = "width:1000px;" })</td> </tr> <tr> <th colspan="4">Neurfofeedback Information</th> </tr> <tr> <td colspan="4">@Html.LabelFor(m => m.NeurofeedbackModel.Therapy_Used)<br /> @Html.TextAreaFor(m => m.NeurofeedbackModel.Therapy_Used, new { @style = "width:1000px;" }) </td> </tr> <tr> <th colspan="4">Other Data(enter finding)</th> </tr> <tr> <td>@Html.LabelFor(m => m.OtherDataModel.Angio)@Html.TextBoxFor(m => m.OtherDataModel.Angio, new { @style = "width:100px;" })</td> <td>@Html.LabelFor(m => m.OtherDataModel.CT)@Html.TextBoxFor(m => m.OtherDataModel.CT, new { @style = "width:100px;" })</td> <td>@Html.LabelFor(m => m.OtherDataModel.EEG)@Html.TextBoxFor(m => m.OtherDataModel.EEG, new { @style = "width:100px;" })</td> <td>@Html.LabelFor(m => m.OtherDataModel.Lumbar)@Html.TextBoxFor(m => m.OtherDataModel.Lumbar, new { @style = "width:100px;" })</td> </tr> <tr> <td>@Html.LabelFor(m => m.OtherDataModel.MRI)@Html.TextBoxFor(m => m.OtherDataModel.MRI, new { @style = "width:100px;" })</td> <td>@Html.LabelFor(m => m.OtherDataModel.Neuro_Exam)@Html.TextBoxFor(m => m.OtherDataModel.Neuro_Exam, new { @style = "width:100px;" })</td> <td colspan="2">@Html.LabelFor(m => m.OtherDataModel.X_Ray)@Html.TextBoxFor(m => m.OtherDataModel.X_Ray, new { @style = "width:100px;" })</td> </tr> <tr> <td colspan="4">@Html.LabelFor(m => m.OtherDataModel.Other_Data_Other)<br /> @Html.TextAreaFor(m => m.OtherDataModel.Other_Data_Other, new { @style = "width:1000px;" })</td> </tr> <tr> <th colspan="4">Narrative Information</th></tr> <tr> <td colspan="4">@Html.LabelFor(m => m.NarrativeModel.NarrativeSummary)<br /> @Html.TextAreaFor(m => m.NarrativeModel.NarrativeSummary, new { @style = "width:1000px;" })</td> </tr> <tr> <th>Upload all Documents</th> </tr> <tr> <td><input type="file" name="files" id="files" multiple="multiple" /><br/> <input id="id" name="id" type="hidden" value="5168e-yada-yada" /> <div id="custom-queue"></div> @Html.HiddenFor(m => m.FileUrl) </td> </tr> </tbody> </table> <p> <input type="submit" name="Create" value="Submit" /> </p> </fieldset> }I need it work with this form in a view.
I can already can upload multiply files.
postonoh
Member
498 Points
259 Posts
Re: Multiple file upload problems
May 04, 2012 08:08 PM|LINK
ok.. I am changing this code
<script type="text/javascript"> $(function () { $('#files').uploadify({ 'swf': '@Url.Content("~/Scripts/uploadify/uploadify.swf")', // 'uploader': '@Url.Action("Patients","Doctors")', 'cancelImage': '@Url.Content("~/Scripts/uploadify/cancel.png")', 'checkScript': '@Url.Content("~/Scripts/uploadify/uploadify-check-exists.php")', 'script': $('form').attr('action'), 'multi': true, 'auto': true, 'queueID': 'custom-queue', 'removeCompleted': false, 'onDialogClose': function (queue) { $('#status-message').text(queue.filesQueued + ' files have been added to the queue.'); }, 'onQueueComplete': function (stats) { $('#status-message').text(stats.successful_uploads + ' files uploaded, ' + stats.upload_errors + ' errors.'); } }); $('form').submit(function () { $('#files').uploadifySettings('scriptData', { thisGuid: $('#id').val() }); $('#files').uploadifyUpload(); return false; }); }); </script> for this one: <script type="text/javascript"> $(function () { $('#files').uploadify({ 'swf': '@Url.Content("~/Scripts/uploadify/uploadify.swf")', // 'uploader': '@Url.Action("Patients","Doctors")', 'cancelImage': '@Url.Content("~/Scripts/uploadify/cancel.png")', 'checkScript': '@Url.Content("~/Scripts/uploadify/uploadify-check-exists.php")', 'script': $('form').attr('post'), 'multi': true, 'auto': true, 'queueID': 'custom-queue', 'removeCompleted': false, 'onDialogClose': function (queue) { $('#status-message').text(queue.filesQueued + ' files have been added to the queue.'); }, 'onQueueComplete': function (stats) { $('#status-message').text(stats.successful_uploads + ' files uploaded, ' + stats.upload_errors + ' errors.'); } }); $.post("@Url.Action("Patients","Doctors")").submit(function () { $('#files').uploadifySettings('scriptData', { thisGuid: $('#id').val() }); $('#files').uploadifyUpload(); return false; }); }); </script>change form to post.