title: HTML5 File API with Remote File
body: <p>I am trying for hours to use the HTML5 FileSystem to add a remote file with an URL (like <a href="http://example.com/doc.pdf" rel="nofollow">http://example.com/doc.pdf</a>) instead of the file obtained by the file input because I want the process to be automatic (I have more than one doc) but I didn't found anything about the process...</p>
  
  <p>All examples I found concern local files (added with a file input)...</p>
  
  <p>I give you few lines of my code :</p>
  
  <pre><code>window.requestFileSystem(TEMPORARY, 1024 * 1024 * 10,  function(fs) {
    FS_ = fs;
    addRemoteDocuments();
  }, errorCallback);
  
  function addRemoteDocuments(){
  var docList = [ "http://cpbdev/html5tests/pdf/tarifs.pdf", "http://cpbdev/html5tests/pdf/tarifs1.pdf", "http://cpbdev/html5tests/pdf/tarifs2.pdf", "http://cpbdev/html5tests/pdf/tarifs3.pdf", "http://cpbdev/html5tests/pdf/tarifs4.pdf" ];
  
  for (var i = 0, doc; doc = this.docList[i]; ++i) {
  
  // Capture current iteration's file in local scope for the getFile() callback.
  (function(f) {
  
    FS_.root.getFile(getName(doc), {create: true, exclusive: true}, function(fileEntry) {
      fileEntry.createWriter(function(fileWriter) {
        fileWriter.onwriteend = function(e) {
          console.log('Write completed for doc '+i);
        };
  
        fileWriter.write(GET_REMOTE_FILE(doc));
      }, errorCallback);
    }, errorCallback);
  })(doc);
  }
  
  readDirectories();
  }
  
  function GET_REMOTE_FILE(doc){
    //Impossible to find a way to get File (with possibility to use file.name and others properties)
  }
  </code></pre>
  
  <p>Maybe with a simulated click to a hidden file input (if it's possible to add a remote file...)</p>
  
  <p>I hope somebody can help me because the docs about remote files and filesystem are difficult to find... </p>
  
  <p>Thanks everybody :)</p>
  
  <p>Brice.</p>