Why do dropzone options fail to load?2019 Community Moderator ElectionProgrammatically Add Existing File to DropzoneDropZone acceptedFiles type filterWhy is Dropzone Failing for Large Uploads?dropzone with jquery and its optionsdropzone options not working with knockoutpreviewsContainer and clickable options not working in dropzoneDropzone with custom options not workingdropzone JS Preview element optionDropzone configure for delete optionUploading multiple files in one request Dropzone Asp.Net Core 2

What favor did Moody owe Dumbledore?

Knife as defense against stray dogs

A Ri-diddley-iley Riddle

Am I eligible for the Eurail Youth pass? I am 27.5 years old

Do I need to consider instance restrictions when showing a language is in P?

Optimising a list searching algorithm

Calculate the frequency of characters in a string

Matrix using tikz package

How does one measure the Fourier components of a signal?

Maths symbols and unicode-math input inside siunitx commands

How to get the n-th line after a grepped one?

Geography in 3D perspective

How could an airship be repaired midflight?

Does .bashrc contain syntax errors?

How to define limit operations in general topological spaces? Are nets able to do this?

Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?

Print last inputted byte

Using Past-Perfect interchangeably with the Past Continuous

Should I use acronyms in dialogues before telling the readers what it stands for in fiction?

I seem to dance, I am not a dancer. Who am I?

What are substitutions for coconut in curry?

Does the attack bonus from a Masterwork weapon stack with the attack bonus from Masterwork ammunition?

Unfrosted light bulb

What is the term when voters “dishonestly” choose something that they do not want to choose?



Why do dropzone options fail to load?



2019 Community Moderator ElectionProgrammatically Add Existing File to DropzoneDropZone acceptedFiles type filterWhy is Dropzone Failing for Large Uploads?dropzone with jquery and its optionsdropzone options not working with knockoutpreviewsContainer and clickable options not working in dropzoneDropzone with custom options not workingdropzone JS Preview element optionDropzone configure for delete optionUploading multiple files in one request Dropzone Asp.Net Core 2










0















I have a dropzone on my view and would like to set some options to force the files to be .zip. I also need to allow for these files to be bigger and get some information when it returns. The options don't seem to be loading for me and quecomplete never gets hit.



Edit.cshtml:



<div class="row">
<div class="col-8">
<form asp-action="UploadFiles" class="dropzone" id="versionFiles">
</form>
</div>
</div>


@section Scripts
<script>
$(document).ready(function ()
Dropzone.options.versionFiles =
acceptedFiles: ".zip",
maxFileSize: 2048,
timeout: 600000,
init: function ()
this.on("queuecomplete", function (file, response)
console.log(file);
)

;

)
</script>



Edit: Fixed timeout










share|improve this question




























    0















    I have a dropzone on my view and would like to set some options to force the files to be .zip. I also need to allow for these files to be bigger and get some information when it returns. The options don't seem to be loading for me and quecomplete never gets hit.



    Edit.cshtml:



    <div class="row">
    <div class="col-8">
    <form asp-action="UploadFiles" class="dropzone" id="versionFiles">
    </form>
    </div>
    </div>


    @section Scripts
    <script>
    $(document).ready(function ()
    Dropzone.options.versionFiles =
    acceptedFiles: ".zip",
    maxFileSize: 2048,
    timeout: 600000,
    init: function ()
    this.on("queuecomplete", function (file, response)
    console.log(file);
    )

    ;

    )
    </script>



    Edit: Fixed timeout










    share|improve this question


























      0












      0








      0








      I have a dropzone on my view and would like to set some options to force the files to be .zip. I also need to allow for these files to be bigger and get some information when it returns. The options don't seem to be loading for me and quecomplete never gets hit.



      Edit.cshtml:



      <div class="row">
      <div class="col-8">
      <form asp-action="UploadFiles" class="dropzone" id="versionFiles">
      </form>
      </div>
      </div>


      @section Scripts
      <script>
      $(document).ready(function ()
      Dropzone.options.versionFiles =
      acceptedFiles: ".zip",
      maxFileSize: 2048,
      timeout: 600000,
      init: function ()
      this.on("queuecomplete", function (file, response)
      console.log(file);
      )

      ;

      )
      </script>



      Edit: Fixed timeout










      share|improve this question
















      I have a dropzone on my view and would like to set some options to force the files to be .zip. I also need to allow for these files to be bigger and get some information when it returns. The options don't seem to be loading for me and quecomplete never gets hit.



      Edit.cshtml:



      <div class="row">
      <div class="col-8">
      <form asp-action="UploadFiles" class="dropzone" id="versionFiles">
      </form>
      </div>
      </div>


      @section Scripts
      <script>
      $(document).ready(function ()
      Dropzone.options.versionFiles =
      acceptedFiles: ".zip",
      maxFileSize: 2048,
      timeout: 600000,
      init: function ()
      this.on("queuecomplete", function (file, response)
      console.log(file);
      )

      ;

      )
      </script>



      Edit: Fixed timeout







      asp.net-core-2.0 dropzone.js






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 6 at 22:02







      Rachel Martin

















      asked Mar 6 at 21:47









      Rachel MartinRachel Martin

      165314




      165314






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Avoid configuring options for Dropzone inside document.ready(function() /* ... */ ).



          To fix the issue, change your code as below :




          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("ssssssssssssss",file);
          )

          ;
          );


          [Edit] :



          The reason is the Dropzone.js will automatically discover all form elements with the class dropzone and automatically attach itself to it. If you configure the options by document.ready(function()/.../), you cannot guarantee the options is set before dropzone takes effects.



          If you do need to trigger after document is ready, you could use a programmatical way to assure the sequence:



          Dropzone.autoDiscover = false; // disable auto discover

          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("xyz...",file);
          )

          ;
          $("#versionFiles").dropzone( ); // trigger it
          );





          share|improve this answer

























          • This is what I did before, but my colleague said it wasn't working. Can you tell me why not to use document.ready? Several of the examples I have read are setting options there.

            – Rachel Martin
            Mar 7 at 13:47











          • @RachelMartin I've updated my answer, both ways work fine for me. If you have any other questions, feel free to let me know.

            – itminus
            Mar 8 at 1:52










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032700%2fwhy-do-dropzone-options-fail-to-load%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Avoid configuring options for Dropzone inside document.ready(function() /* ... */ ).



          To fix the issue, change your code as below :




          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("ssssssssssssss",file);
          )

          ;
          );


          [Edit] :



          The reason is the Dropzone.js will automatically discover all form elements with the class dropzone and automatically attach itself to it. If you configure the options by document.ready(function()/.../), you cannot guarantee the options is set before dropzone takes effects.



          If you do need to trigger after document is ready, you could use a programmatical way to assure the sequence:



          Dropzone.autoDiscover = false; // disable auto discover

          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("xyz...",file);
          )

          ;
          $("#versionFiles").dropzone( ); // trigger it
          );





          share|improve this answer

























          • This is what I did before, but my colleague said it wasn't working. Can you tell me why not to use document.ready? Several of the examples I have read are setting options there.

            – Rachel Martin
            Mar 7 at 13:47











          • @RachelMartin I've updated my answer, both ways work fine for me. If you have any other questions, feel free to let me know.

            – itminus
            Mar 8 at 1:52















          1














          Avoid configuring options for Dropzone inside document.ready(function() /* ... */ ).



          To fix the issue, change your code as below :




          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("ssssssssssssss",file);
          )

          ;
          );


          [Edit] :



          The reason is the Dropzone.js will automatically discover all form elements with the class dropzone and automatically attach itself to it. If you configure the options by document.ready(function()/.../), you cannot guarantee the options is set before dropzone takes effects.



          If you do need to trigger after document is ready, you could use a programmatical way to assure the sequence:



          Dropzone.autoDiscover = false; // disable auto discover

          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("xyz...",file);
          )

          ;
          $("#versionFiles").dropzone( ); // trigger it
          );





          share|improve this answer

























          • This is what I did before, but my colleague said it wasn't working. Can you tell me why not to use document.ready? Several of the examples I have read are setting options there.

            – Rachel Martin
            Mar 7 at 13:47











          • @RachelMartin I've updated my answer, both ways work fine for me. If you have any other questions, feel free to let me know.

            – itminus
            Mar 8 at 1:52













          1












          1








          1







          Avoid configuring options for Dropzone inside document.ready(function() /* ... */ ).



          To fix the issue, change your code as below :




          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("ssssssssssssss",file);
          )

          ;
          );


          [Edit] :



          The reason is the Dropzone.js will automatically discover all form elements with the class dropzone and automatically attach itself to it. If you configure the options by document.ready(function()/.../), you cannot guarantee the options is set before dropzone takes effects.



          If you do need to trigger after document is ready, you could use a programmatical way to assure the sequence:



          Dropzone.autoDiscover = false; // disable auto discover

          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("xyz...",file);
          )

          ;
          $("#versionFiles").dropzone( ); // trigger it
          );





          share|improve this answer















          Avoid configuring options for Dropzone inside document.ready(function() /* ... */ ).



          To fix the issue, change your code as below :




          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("ssssssssssssss",file);
          )

          ;
          );


          [Edit] :



          The reason is the Dropzone.js will automatically discover all form elements with the class dropzone and automatically attach itself to it. If you configure the options by document.ready(function()/.../), you cannot guarantee the options is set before dropzone takes effects.



          If you do need to trigger after document is ready, you could use a programmatical way to assure the sequence:



          Dropzone.autoDiscover = false; // disable auto discover

          $(document).ready(function ()
          Dropzone.options.versionFiles =
          acceptedFiles: ".zip",
          maxFileSize: 2048,
          timeout: 600000,
          init: function ()
          this.on("queuecomplete", function (file, response)
          console.log("xyz...",file);
          )

          ;
          $("#versionFiles").dropzone( ); // trigger it
          );






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 8 at 1:50

























          answered Mar 7 at 5:56









          itminusitminus

          4,2131424




          4,2131424












          • This is what I did before, but my colleague said it wasn't working. Can you tell me why not to use document.ready? Several of the examples I have read are setting options there.

            – Rachel Martin
            Mar 7 at 13:47











          • @RachelMartin I've updated my answer, both ways work fine for me. If you have any other questions, feel free to let me know.

            – itminus
            Mar 8 at 1:52

















          • This is what I did before, but my colleague said it wasn't working. Can you tell me why not to use document.ready? Several of the examples I have read are setting options there.

            – Rachel Martin
            Mar 7 at 13:47











          • @RachelMartin I've updated my answer, both ways work fine for me. If you have any other questions, feel free to let me know.

            – itminus
            Mar 8 at 1:52
















          This is what I did before, but my colleague said it wasn't working. Can you tell me why not to use document.ready? Several of the examples I have read are setting options there.

          – Rachel Martin
          Mar 7 at 13:47





          This is what I did before, but my colleague said it wasn't working. Can you tell me why not to use document.ready? Several of the examples I have read are setting options there.

          – Rachel Martin
          Mar 7 at 13:47













          @RachelMartin I've updated my answer, both ways work fine for me. If you have any other questions, feel free to let me know.

          – itminus
          Mar 8 at 1:52





          @RachelMartin I've updated my answer, both ways work fine for me. If you have any other questions, feel free to let me know.

          – itminus
          Mar 8 at 1:52



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032700%2fwhy-do-dropzone-options-fail-to-load%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

          Алба-Юлія

          Захаров Федір Захарович