2016-12-02 2 views
0

많은 "큰"파일을 업로드 할 때이 문제를보고하는 dropzone.js에 문제가 있습니다 (각 크기가 3-5MB 임)무거운 파일을 업로드 할 때 "No Dropzone found found"오류가 발생했습니다.

Uncaught Error: No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the init option to setup any additional observers on your Dropzone

모든 파일을 작은 파일 (100-300kbs)

업로드와 함께 잘 작동

사람이 여기에 무슨 일이 일어나고 있는지 알고 있나요?

+0

당신은 specificly 그들의 각 하나 init을해야한다 –

답변

0

dropzone에 ID를 제공하는 것을 잊었을 수 있습니다.

다음과 같은 방법으로 구성 요소를 사용할 수 있습니다. 당신이 많은 드롭 존이있는 경우

{{drop-zone url='http://localhost/dummy' addfilehere=(action "addfilehere") 
id="uniqueID" addRemoveLinks=true autoProcessQueue=false}} 

당신은 당신이 당신의 ID에 다음 참조를 추가 할 수 있습니다 DROPZONE를 사용하는 구성 요소의

this.set('dropzone', Dropzone.forElement('#uniqueID'));