This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
UploadiFive 1.1.1 has been released which includes a small fix for added support on touch devices including iOS 6 devices.
No Files attached to Request?
  • I'm not sure if you're familiar with the ASP MVC framework, but I am trying to implement Uploadifive 1.0. When in debugger mode, I know that the upload action is successfully passed to the Controller and the Server variables are passed as well. However, the HttpPostedFileBase variable fileData is always null. I've looked everywhere on google and couldn't find an answer. I found out that the variable has to be called fileData. That doesn't help though.

    I checked all the request variables and what seems strange to me is that the content length in bytes is also correct of the upload file. But there are no attached files. The custom headers HTTP_X_... come through as well.

    Here's part of the view:

    <form action="<%: Url.Action("SaveFiles", "File") %>" enctype="multipart/form-data">
    <input type="file" name="file_upload" id="file_upload" />
    </form>

    <script type="text/javascript">
    (function ($) {
    $(document).ready(function () {
    $('#file_upload').uploadifive({
    'method': 'post',
    'uploadScript': 'SaveFiles',
    'formData': {'path' : 'documents'}
    });
    });
    })(jQuery);
    </script>


    Here's the controller action:

    [HttpPost]
    public ActionResult SaveFiles(HttpPostedFileBase fileData)
    {
    string uploadFolder = Request.ServerVariables.Get("HTTP_X_PATH");
    if(string.IsNullOrWhiteSpace(uploadFolder))
    return Json(JsonMessageManager.GetFailureMessage("No upload folder was selected"));

    if (fileData != null && fileData.ContentLength > 0)
    {
    var fileName = Path.GetFileName(fileData.FileName);
    var path = Path.Combine(Server.MapPath("~/Content/" + uploadFolder), fileName);
    fileData.SaveAs(path);
    return Json(true);
    }
    return Json(false);
    }


    Not sure where the problem is. I've looked at other implementations using the MVC framework and I am doing exactly what they do and they seem to get it working.
  • I have no experience with ASP so this is just a wild guess. I ran into similar issues with java. For me, using the standard multipart/form-data with multi required set boundaries since the file is chunked. My app wasn't able to determine the end of file and never could finish the process. I changed the content-type in uploadify js to application/octet-stream and everything worked. The better method would be to post the uploads in a boundary separated body but this solved it for me for the time being.
  • I'm having the exact same problem with ASP.NET MVC2 and uploadifive. The server variables come through fine but there is nothing is Request.Files. Nothing on Google or Stackoverflow re this. I'm going to keep at it but please post a solution if anyone comes up with one.
  • Hey guys. The initial build of UploadiFive sent the file as binary. There is a new version available for download, same link you have should work or you can request your link again from the download page for free. The new version sends the file like Uploadify so there should be files attached.
  • @RonnieSan Thanks a lot of the prompt response. The update has done the trick and it works exactly like uploadify now. One thing that caught me at first is the fact that I was actually referencing the minified version in my code which I overrode with your update. It appears that the minified version in the download has not been updated to reflect the changes that were made to the full source so now I'm having to reference the full source version. Not a biggie. Just letting you know. Thanks again!
  • Thanks for the heads up. The download packages have been updated with the correct minified versions.
  • Hi,

    I stumbled across this thread after downloading and installing Uploadifive today. I'm having the same problem where the the HttpPostedFileBase fileData property is always null when the controller is called.

    I've double checked the version number to ensure I'm on 1.0.2, and can confirm that Request.Files is seeing selected files. To double check that it's not just a personal implementation problem, I have also copied in the code at the top of this function, and it produces the exact same result.

    Any thoughts on what I can do to identify what is happening further? Any help would be most appreciated.
  • Hi, im having the same problem as smallredbox, i paid 5 bucks for uploadifive and downloaded 1.0.2 and the HttpPostedFileBase object is null.


    Thank you very much
  • /**Controller*/
    [HttpPost]
    public String Upload(HttpPostedFileBase fileData)
    {
    var fileName = this.Server.MapPath("~/Content/images/products/" + System.IO.Path.GetFileName(fileData.FileName));
    fileData.SaveAs(fileName);
    return "ok";
    }

    /**View*/

    $(function() {
    $('#file_upload').uploadifive({
    'method' : 'post',
    'uploadScript' : 'Upload',
    'buttonText': 'Selecciona',
    'fileType': 'image',
    'auto' : true

    // Put your options here
    });
    });


    @using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    ProductPhoto


    @Html.LabelFor(model => model.PhotoFile)



    @Html.Hidden("PhotoFile")
    @Html.Hidden("ProductId", "1")



    @Html.LabelFor(model => model.Description)


    @Html.EditorFor(model => model.Description)
    @Html.ValidationMessageFor(model => model.Description)






    }
  • Same problem, fileData always null. Worked with Flash version. But Flash version doesn't work with Windows Authentication. Stuck between a rock and a hard place with this Uploadify.