2

DotNetNuke에서 Aquantum Multiple File Upload을 사용하려고하는데 작동하지 않습니다. Form 태그를 설정할 수 없기 때문에 Aparently입니다.DotNetNuke에 Aquantum Multiple File Uploader (Jquery Plugin)를 사용하는 방법?

아무도 양식 태그를 사용하지 않고 pluing을 구현하는 방법을 알고 있습니까?

:

예 :

<form id="file_upload" class="file_upload" runat="server"> 
     <div id = "filediv"> 
     <input type="file" name="file" multiple> 
     <button>Upload</button> 
     <div>Upload files</div> 
     </div> 
     <table id="files"></table> ... 
    </form> 

그러나 다음 작업을 수행 할 수 있도록하고 싶습니다 : 샘플은 다음을 보여줍니다 한

<div id="file_upload" class="file_upload" runat="server"> 
     <div id = "filediv"> 
     <input type="file" name="file" multiple> 
     <button>Upload</button> 
     <div>Upload files</div> 
     </div> 
     <table id="files"></table> ... 
    </div> 

자바 스크립트 내가 사용입니다

<script> 
     /*global $ */ 
     $(function() { 


      $('.file_upload').fileUploadUI({ 
       url: 'FileUpload.ashx', 
       method: 'POST', 
       uploadTable: $('#files'), 
       downloadTable: $('#files'), 
       buildUploadRow: function (files, index) { 
        return $('<tr><td>' + files[index].name + '<\/td>' + 
         '<td class="file_upload_progress"><div><\/div><\/td>' + 
         '<\/td><\/tr>'); 
       }, 
       buildDownloadRow: function(file) { 
       return $('<tr id="file_'+file.name+'"><td>' + file.name + '<\/td>' 
        + '<td class="file_uploaded">' + 
        '<span class="ui-icon ui-icon-check"><\/span>' + 
        '<\/td><\/tr>'); 

       }, beforeSend: function(event, files, index, xhr, handler, callBack) { 
        if (files[index].size > 500000) { 
         handler.uploadRow.find('.file_upload_progress').html('<span class="ui-icon ui-icon-alert"><\/span>FILE TOO BIG!'); 
         setTimeout(function() { 
          handler.removeNode(handler.uploadRow); 
         }, 10000); 
         return; 
        } 
        callBack(); 
       } 
      }); 
     }); 
    </script> 

감사합니다. 어떤 도움을 환영합니다!

답변

1

설명서를 보면 IE & Opera를 지원하기 위해 form을 사용해야하지만 DNP에서 사용할 수있는 것은 form뿐입니다. FileUpload.ashx 비헤이비어를 web.config에 설정된 HttpHandler로 이동하는 것이 좋습니다. 그런 다음 DNN이 수행하기 전에 요청을 처리 할 수 ​​있습니다 (jQuery 플러그인의 formData 옵션을 사용하여 게시물에 일종의 플래그를 추가 한 다음 처리기에서 찾으십시오).

코드를 보면 다른 브라우저에서도 작동하는 것으로 보입니다. first FAQ in the documentationurl, methodfieldName 옵션을 지원하는 브라우저에서 양식을 다룰 수 있도록 설정해야한다고 말합니다. 따라서 fieldName을 설정하고 도움이되는지 확인해보십시오.

무슨 문제가 있습니까? 자바 스크립트 오류가 있습니까? ASHX 처리기가 전혀 작동하지 않습니까?