title: 401 Unauthorized error when uploading an image to Cloudinary
body: <p>I'm using ruby (2.0.0), rails (3.2.17), cloudinary (1.0.70), and jquery-rails (3.1.0). I'm getting this error only when the image upload tag is nested multiple levels deep. If it's only one level deep, I'm able to upload properly. The file upload that is generated is <em>(cloudname, signature, and api key replaced with "xxxx" for StackOverflow)</em>:</p>
  
  <pre><code>&lt;input 
    type="file" 
    name="file" 
    data-url="https://api.cloudinary.com/v1_1/xxxxxxxxx/auto/upload" 
    data-form-data="{&amp;quot;timestamp&amp;quot;:1399504570,&amp;quot;callback&amp;quot;:&amp;quot;http://localhost:8080/cloudinary_cors.html&amp;quot;,&amp;quot;signature&amp;quot;:&amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;,&amp;quot;api_key&amp;quot;:&amp;quot;xxxxxxxxxxxxxxx&amp;quot;}" 
    data-cloudinary-field="page[figures_attributes][1399504574259][images_attributes][0][asset]"
    class="cloudinary-fileupload
  "&gt;
  </code></pre>
  
  <p>Which, from what I have read seems to be correct, however I am still getting <code>{"error":{"message":"Invalid cloud_name undefined"}}</code> when I try a direct upload. </p>
  
  <p><strong>EDIT:</strong> 
  The URL that it hits when attempting to upload is <code>https://api.cloudinary.com/v1_1/undefined/upload</code>. This makes me wonder why the URL from the <code>data-url</code> attribute in the input is not being used and how this URL is generated.</p>
  
  <p>I'm generating the file upload tag like this:</p>
  
  <pre><code>= f.cl_image_upload :asset
  </code></pre>
  
  <p>My application.js looks like this:</p>
  
  <pre><code>// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
  // GO AFTER THE REQUIRES BELOW.
  //
  //= require jquery
  //= require jquery_ujs
  //= require ckeditor/init
  //= require cloudinary
  //= require_tree ../../../vendor/assets/javascripts/.
  //= require_tree .
  </code></pre>
  
  <p>Please let me know if you need any other information. Thanks!</p>