title: Storing assets in Apigee
body: <p>I am trying to upload assets to apigee baas for which I follow the docu in here:
  <a href="http://apigee.com/docs/api-baas/content/assets" rel="nofollow">http://apigee.com/docs/api-baas/content/assets</a></p>
  
  <p>Here is my code:</p>
  
  <pre><code>    var querystring = require('querystring');
  
      var data = querystring.stringify({
          filename: 'car_123.jpg', //asset's name on Apigee
          file_location: 'http://cdn.xxxx.com/cars/123.jpg' //asset's original destination
      });
  
      var target_url = "https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/cars/&lt;uuid&gt;?access_token=dummyaccesstokenfor_SO"
  
      var options = {
          method: 'POST',
          url: target_url,
          headers: {
              'Content-Type': 'application/x-www-form-urlencoded',
              'Content-Length': Buffer.byteLength(data)
          }
      };
  
      var request = require('request');
  
      request(options, function(err, data) {
          if (err) {
              console.log(err)
          } else {
              console.log('success')    
          };
      });
  </code></pre>
  
  <p>When I run this, I get a success message. I want to believe that the image from the cdn is physically
  copied into Apigee. Seems that's not true</p>
  
  <p>because, when I issue a GET on 
      <a href="https://api.usergrid.com/org/app/cars/uuid?access_token=dummyaccesstokenfor_SO" rel="nofollow">https://api.usergrid.com/org/app/cars/uuid?access_token=dummyaccesstokenfor_SO</a> with header 'Accept:image/jpeg', all I get is this</p>
  
  <blockquote>
    <p>filename=cars_123.jpg&amp;file_location='<a href="http://cdn.xxxx.com/cars/123.jpg" rel="nofollow">http://cdn.xxxx.com/cars/123.jpg</a></p>
  </blockquote>
  
  <p>And no base64 image string or image url.</p>
  
  <p>Where am I going wrong?</p>
  
  <p>EDIT: I don't see anything in the BaaS GUI either</p>
  
  <p>EDIT2: As per remus's suggestion</p>
  
  <blockquote>
    <p>curl -X POST -i -F name='apple-128' -F file=@"<a href="https://cdn4.iconfinder.com/data/icons/flat-brand-logo-2/512/apple-128.png" rel="nofollow">https://cdn4.iconfinder.com/data/icons/flat-brand-logo-2/512/apple-128.png</a>" '<a href="http://requestb.in/11xu3h61" rel="nofollow">http://requestb.in/11xu3h61</a>'</p>
  </blockquote>
  
  <p>this results in </p>
  
  <blockquote>
    <p>curl: (26) couldn't open file "<a href="https://cdn4.iconfinder.com/data/icons/flat-brand-logo-2/512/apple-128.png" rel="nofollow">https://cdn4.iconfinder.com/data/icons/flat-brand-logo-2/512/apple-128.png</a>"</p>
  </blockquote>
  
  <p>The cdn used here is just a place holder. But the result with my cdn is just the same. So, it is failing even before the POST. Makes me wonder if the file location can be a http location at all or not?</p>