jquery - uplodify uploads files one by one -


i use uplodify 3.1 upload multiple files in asp.net. allows select mutiple files , uploads them. probem have click upload button each item. (aouto attribute set false) here code:

<head> <script src="scripts/jquery.js" type="text/javascript"></script>     <script src="scripts/jquery.uploadify-3.1.js" type="text/javascript"></script>     <script type="text/javascript">         $(window).load(     function () {         $("#<%=fileupload1.clientid%>").uploadify({             'swf': 'scripts/uploadify.swf',             'uploader': 'upload.ashx',             'filetypedesc': 'image files',             'filetypeexts': '*.jpg;*.jpeg;*.gif;*.png',             'multi': true,             'formdata': { 'galerisi': '<%=session["galeriid"]%>' },             'auto': false,             'buttonimage': 'styles/images/btnyorumekle.png',             'buttontext': 'dosya seç'          });     } );     </script> </head> <body>     <form id="form1" runat="server">     <div>         <div style="float: left;">             <asp:fileupload id="fileupload1" runat="server" />         </div>         <div style="left: 136px; position: absolute; top: 18px;">             <a class="bluebutton" href="javascript:$('#<%=fileupload1.clientid%>').uploadify('upload')">                 yükle</a>         </div>         <div style="left: 205px; position: absolute; top: 18px;">             <a class="bluebutton" href="javascript:$('#<%=fileupload1.clientid%>').fileuploadclearqueue()">                 temizle</a>         </div>     </div>     </form> </body> 

and code in ashx file:

<%@ webhandler language="c#" class="upload" %>  using system; using system.web; using system.io;  using system.collections.generic; using system.web.sessionstate; public class upload : ihttphandler, system.web.sessionstate.irequiressessionstate {       galeriislemleri galeriler = new galeriislemleri();     tools tollar = new tools();       public void processrequest(httpcontext context)     {          context.response.contenttype = "text/plain";         context.response.expires = -1;           try         {                 string galeriklasoru = context.request["galerisi"].tostring();                  var db = tools.dbbaglanti();                 httppostedfile postedfile = context.request.files["filedata"];                  string savepath = "";                 string temppath = "";                 temppath = "images/galeriler/" + galeriklasoru;                  savepath = context.server.mappath(temppath);                  string filename = postedfile.filename;                 if (!directory.exists(savepath))                     directory.createdirectory(savepath);                  postedfile.saveas(savepath + @"\" + filename);                 context.response.write(temppath + "/" + filename);                 context.response.statuscode = 200;                   galeriresimleri resimler = new galeriresimleri();                 resimler.galeriid = convert.toint32(galeriklasoru);                 resimler.resim = filename;                 db.galeriresimleris.insertonsubmit(resimler);                 db.submitchanges();          }         catch (exception ex)         {             context.response.write("error: " + ex.message);         }       }      public bool isreusable     {                 {             return false;         }     } } 

please help.

reference: http://www.uploadify.com/documentation/uploadify/upload/

it seems if auto set false have pass asterisk '*' fileid upload of files in queue. example:

<a class="bluebutton" href="javascript:$('#%=fileupload1.clientid%>').uploadify('upload','*')">yükle</a> 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -