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

  • Home
  • SEARCH
  • 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 6154245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:13:56+00:00 2026-05-23T20:13:56+00:00

I am using the new FileReader API to preview images before upload. This is

  • 0

I am using the new FileReader API to preview images before upload. This is done using DataURLs. But DataURLs can be massive if the images are large. This is especially a problem for me as the user may upload multiple images at a time and previewing the bunch has actually slowed my browser considerably and actually crashed chrome a few times.

Is there any alternative to using DataURLs for previewing images on the client before upload?

  • 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-23T20:13:57+00:00Added an answer on May 23, 2026 at 8:13 pm

    You can also store data on the client’s disk (in another location so that you can access the file using JavaScript). This article is quite extensive when it comes to this subject:

    http://www.html5rocks.com/en/tutorials/file/filesystem/

    It’s not supported on all browsers though.

    You have to request storage space (the file system), then create a file, write data to it, and finally fetch the URL:

    window.requestFileSystem(window.PERSISTENT, 5*1024*1024, function(fs) {
        fs.root.getFile(filename, {create: true}, function(fileEntry) {
            fileEntry.createWriter(function(fileWriter) {
                var arr = new Uint8Array(data.length);
    
                // fill arr with image byte data here
    
                var builder = new BlobBuilder();
                builder.append(arr.buffer);
                var blob = builder.getBlob();
    
                fileWriter.write(blob);
    
                location.href = fileEntry.toURL(); // navigate to file. The URL does not contain the data but only the path and filename.
            });
        });
    }, function() {});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone give me an example of using the FileReader API go get contents
I have a question about using new[] . Imagine this: Object.SomeProperty = new[] {string1,
When you allocate an array using new [] , why can't you find out
ADO.NET has the notorious DataRow class which you cannot instantiate using new. This is
Can I call constructor explicitly, without using new , if I already have a
I want to classify a new instance using serialized classifier. I found this class
I'm using html5 to create drag and drop image upload functionality. This works great
I'm using javascript FileReader class to preview the image prior to uploading it to
I have this code to sort a text file using arrays in java, but
when using new Date,I get something like follows: Fri May 29 2009 22:39:02 GMT+0800

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.