title: How to set params dynamically for AjaxUpload?
body: <p>I have created a function to upload a file using <a href="https://github.com/valums/ajax-upload" rel="nofollow">this library</a> as follows:</p>
  
  <pre><code>new AjaxUpload($('#addImage'), {
                  action: 'SaveDataBank.aspx',
                  name: 'uploadimage',
                  dataType: 'json',
                  params: { clientid: GetSelectedClient() }
                  onSubmit: function (file, ext) {
                  },
                  onComplete: function (file, response) {
                  }
              });
  </code></pre>
  
  <p>I would like to perform some task before opening a file dialog. How could I update the above code?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I would like to pass a parameter dynamically with the file upload. I have a dropdown containing a list of client ids. If I click on the Upload button it will open File Dialog. I would then like it to pass in the selected client from the dropdown. Currently, it only passes the initially selected value.</p>
  
  <pre><code>params: { clientid: GetSelectedClient() },
  </code></pre>
  
  <p>The above line does not work as per my requirement.</p>