title: Dynamic url via http request - Dropzone.js
body: <p><strong>Problem:</strong> I am getting this error after uploading a file via dropzone.js</p>
  
  <blockquote>
    <p>POST <a href="http://localhost:8080/[object%20Promise]" rel="nofollow noreferrer">http://localhost:8080/[object%20Promise]</a> 404 (Not Found)</p>
  </blockquote>
  
  <p>I am using dropzone.js library in order to upload videos on an app.
  The url is <em>different</em> each time for every file. So I make http request - using axios - in order to get each time the url.</p>
  
  <p>The only possible solution I found was by passing a callback function to the url (Dropzone.options):</p>
  
  <pre><code>   var myDropzone = new Dropzone(".my-upload-container", { 
              url: axios.post('/createURL)
                     .then( function (response) {
                         var theURL = bla
                         return theURL
                     })
            });
  </code></pre>
  
  <p>When I am uploading a file and the Dropzone is sending a POST request, I am getting this 404 error.</p>
  
  <p><strong>Question:</strong>
  How can I get the correct url that I want?</p>
  
  <p>A sample of a url that I want is like: <a href="http://blabla.com/v1/key=bla&amp;token=bla" rel="nofollow noreferrer">http://blabla.com/v1/key=bla&amp;token=bla</a></p>