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 8271043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:44:45+00:00 2026-06-08T06:44:45+00:00

Hi i am using the JS HTML5 File API to handle file uploads to

  • 0

Hi i am using the JS HTML5 File API to handle file uploads to my server.

I am getting the following error in Aurora(Fire Fox Bleeding edge builds)

NS_ERROR_INVALID_POINTER: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMFileReader.readAsBinaryString]

function readBlob(opt_startByte, opt_stopByte,file,partNo) {

    var start = parseInt(opt_startByte);
    var stop = parseInt(opt_stopByte);
    var reader = new FileReader();

    var totalParts = parseInt(file.size/MAX_READ);
    if((file.size % MAX_READ) !== 0){
        totalParts++;
    }
    // If we use onloadend, we need to check the readyState.
    reader.onloadend = function(evt) {
        if (evt.target.readyState == FileReader.DONE) {
            //var contents =  reader.result;
            postFilePart(partNo,contents,totalParts,escape(file.name))// DONE == 2
        }
    };
    if (file.webkitSlice) {
        var blob = file.webkitSlice(start, stop);
    } else if (file.mozSlice) {
        var blob = file.mozSlice(start, stop);
    }
    reader.readAsBinaryString(blob);
}

the error is occurring at this line

reader.readAsBinaryString(blob);

i have tried mozSlice and Slice

if (file.mozSlice) {
var blob = file.mozSlice(start, stop);
}

and it gave me the same results. it might not be the best idea to use HTML 5 API yet as this may cause issues with other browsers as well.

does anyone have a work around to get the same functionality or how i can resolve this particular error

  • 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-06-08T06:44:48+00:00Added an answer on June 8, 2026 at 6:44 am

    Solved the issue it it was rerunning the reader code with incorrect parameters due to a mistake on the calling method

    https://bugzilla.mozilla.org/show_bug.cgi?id=725289

    rather use slice vs mozSlice

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

Sidebar

Related Questions

In my app I upload a file to the server using HTML5 File API,
I am using the HTML5 File API to upload the file to server. It
Using the HTML5 File API I can get the Binary String representation of a
Using HTML5 File API I am able to read text and XML files without
Using the HTML5 File API to upload files, I am currently using some hardcoded
I have been playing with HTML5 Offline web apps and the File API using
I have a written up HTML file using the Google Maps API v3. All
I have an inline audio file to be played in android using html5. I
I want to upload an Excel File using (HTML.Input) in some folder in server
I've been trying to extract URLs from a text file using re api. any

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.