Hello,
I'm trying do a upload file in a add on but my property is null all time.
I can't find the file on QueryString as well.
[HttpPost, ValidateInput(false)] public ActionResult Edit(FormCollection collection , HttpPostedFileBase files) {
if (files == null)
{
// true
}
....
<form action="/IssueTracker/Edit" class="epi-gadgetform" method="post" enctype="multipart/form-data">
<fieldset style="float:left;"> <legend>File</legend> <div class="editor-field"> <input type="file" name="files" id="files"> </div> </fieldset>
<input type="submit" class="epi-button" value="Submit" />
</form>
Someone know why?
What happens when you put a break point on your edit action? Does it even hit the edit action. Also, i think this could be returning null becuase the post is done in an ajax call if i am not mistaken.
I have the files null on using a debug.
Hello,
I'm trying do a upload file in a add on but my property is null all time.
I can't find the file on QueryString as well.
[HttpPost, ValidateInput(false)]
public ActionResult Edit(FormCollection collection , HttpPostedFileBase files)
{
if (files == null)
{
// true
}
....
}
<form action="/IssueTracker/Edit" class="epi-gadgetform" method="post" enctype="multipart/form-data">
<fieldset style="float:left;">
<legend>File</legend>
<div class="editor-field">
<input type="file" name="files" id="files">
</div>
</fieldset>
<input type="submit" class="epi-button" value="Submit" />
</form>
Someone know why?