【问题标题】:Select file is not working with uploadify beta 3选择文件不适用于uploadify beta 3
【发布时间】:2011-08-01 14:11:24
【问题描述】:

我不知道为什么,但是我的 uploadify beta 3 旧实现运行良好 但是现在,当我选择一个文件时,我在文件列表中看不到它......而且我无法上传它...... 如果有人可以帮助我,您将在这里找到我的写作方式。

    <strong>Multiple File Upload</strong></p>
<input id="fileInput2" name="fileInput2" type="file" height="30" width="110">
<div id="fileInput2Queue" class="uploadifyQueue"></div>
<a href="javascript:$('#fileInput2').uploadifyUpload();"><img border="0" src="./content/galerie/img/upload_files.png"></a> <br />
<a href="javascript:$('#fileInput2').uploadifyClearQueue();"><img border="0" src="./content/galerie/img/clear_queue.png"></a>
<script type="text/javascript">
$("#fileInput2").uploadify({
'buttonText' :'Upload',
'swf' : '../extras/uploadify/beta3/uploadify.swf',
'uploader' : './content/galerie/upload/uploadify.php',
'cancelImg' : '../extras/uploadify/beta3/cancel.png',
'checkExisting' : '../extras/uploadify/beta3/uploadify-check-exists.php',
'queueID' : 'fileInput2Queue',
'auto' : false,
'multi' : true,
'simUploadLimit' : 1,
'removeCompleted' : true,
'postData' : {'cat': ''.$_POST['cat'].'','folder' : ''.$directory.''},
'sizeLimit' : 8000,
'onError' : function (event,ID,fileObj,errorObj) {
alert(errorObj.type + ' Error: ' + errorObj.info);
}
});
</script>

【问题讨论】:

    标签: jquery file select upload uploadify


    【解决方案1】:

    我遇到了同样的问题。解决方法很简单,添加参数列表即可:'scriptAccess: 'always'

    【讨论】:

      【解决方案2】:

      试试这个代码:

      <html>
      <head>
      <link href="/upload/uploadify.css" type="text/css" rel="stylesheet" />
      <script type="text/javascript" src="/upload/jquery-1.5.1.min.js"></script>
      <script type="text/javascript" src="/upload/jquery.uploadify.min.js"></script>
      <script type="text/javascript">
      $(document).ready(function() {  
      $('#file_upload').uploadify({
          'uploader'      : '/upload/uploadify.php',
          'swf'           : '/upload/uploadify.swf',
          'cancelImage'   : '/upload/uploadify-cancel.png',
          'buttonText'    : 'Upload image',
          'auto'          : true,
          'multi'         : true,
          'checkExisting' : false
      });
      });
      </script>
      </head>
      
      <body>
          <input id="file_upload" name="file_upload" type="file" />
      </body>
      </html>
      

      【讨论】:

      • @kangun - 发布您的解决方案或标记解决您问题的答案怎么样?
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-14
      • 2013-09-30
      • 1970-01-01
      • 2016-01-04
      相关资源
      最近更新 更多