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.
Returning filename in Asp.Net c#
  • Hi there,

    I implemented the uploadify plugin to my web site called File Manager. What I want to do is upload a file and return the name of the file.
    I need the name of the file and it's extension because I'll save to database.

    Before I upload, I change the name of the file in Upload.ashx.
    How can I get the name of the file after upload is finished.

    My stript in AddFile.aspx is;
    <script type=\"text/javascript\">
    // <![CDATA[
    var id = \"55\";
    var theString = \"asdf\";
    $(document).ready(function() {
    $('#FileUpload1').uploadify({
    'uploader': 'js/uploadify.swf',
    'script': 'Upload.ashx',
    'scriptData': { 'id': id, 'foo': theString},
    'cancelImg': 'images/cancel.png',
    'auto': true,
    'multi': false,
    'queueSizeLimit': 90,
    'sizeLimit': 104857600,
    'buttonText': 'Browse...',
    'folder': '/uploads',
    'onAllComplete': function(event, queueID, fileObj, response, data) {

    }
    });
    });
    // ]]></script>


    And Upload.ashx file
    public void ProcessRequest (HttpContext context) {
    try
    {
    HttpPostedFile file = context.Request.Files[\"Filedata\"];

    string extension = System.IO.Path.GetExtension(file.FileName);
    string strFile = String.Format(\"{0:G}\", System.DateTime.Now.ToShortDateString());
    strFile = strFile.Replace(\"/\", \"\");
    strFile = strFile.Replace(\":\", \"\");
    strFile = strFile.Replace(\".\", \"\");
    strFile = strFile.Replace(\" \", \"\");
    strFile = \"/Files/file_\" + strFile + extension;
    file.SaveAs(System.Web.HttpContext.Current.Server.MapPath(strFile));
    context.Response.Write(\"1\");
    }
    catch (Exception ex)
    {
    context.Response.Write(\"0\");
    }

    }
  • write it


    Context.Write(newFileNameVar)


    in your onComplete event from uploadify, the 'response' variable will contain your name (instead of a 1 or 0)