Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7593703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:14:08+00:00 2026-05-30T21:14:08+00:00

I am trying for hours to use the HTML5 FileSystem to add a remote

  • 0

I am trying for hours to use the HTML5 FileSystem to add a remote file with an URL (like http://example.com/doc.pdf) 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…

All examples I found concern local files (added with a file input)…

I give you few lines of my 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)
}

Maybe with a simulated click to a hidden file input (if it’s possible to add a remote file…)

I hope somebody can help me because the docs about remote files and filesystem are difficult to find…

Thanks everybody 🙂

Brice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:14:10+00:00Added an answer on May 30, 2026 at 9:14 pm

    My article on HTML5Rocks discusses this in depth and gives a full example.
    It involves XHR2 + the Filesystem API.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've spent hours on this one. I'm trying to use Ryan Bate's nested_form_for plugin
I've been trying to solve these problem for last two hours but seems like
I am trying to use JQuery to parse a sitemap.xml to look like this
I've been trying to use twitter4J and this tut ( http://java-tutorial.ch/framework/twitter-with-java-tutorial ) in attempting
I'm trying to use the jasmine-jquery plugin: https://github.com/velesin/jasmine-jquery . In the documentation it says
I've spent hours trying to get my code to work, its a rats nest
I've been trying for hours to get many-to-many relationship to save with Castle ActiveRecord.
I have spent several hours trying to find a means of writing a cross
I've been for the past few hours trying to figure out why openCV doesn't
Ok so I've spent a couple hours trying to resolve this issue and have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.