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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:48:01+00:00 2026-05-22T18:48:01+00:00

i am using ajaxSubmit in jQuery to preview the images but are i really

  • 0

i am using ajaxSubmit in jQuery to preview the images but are i really can save those images.

if yes then can someone show me the code to do that ?

  • 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-22T18:48:02+00:00Added an answer on May 22, 2026 at 6:48 pm

    You can do it if your browser supports FileReader API which is a part of HTML5.

    The basic thing you need to do is:

        xhr.open("POST", url);    
        xhr.setRequestHeader("Content-Type", "multipart/form-data,);
        xhr.setRequestHeader("Cache-Control", "no-cache");     
        body += "Content-Type: application/octet-stream\r\n\r\n";
        body += reader.result + "\r\n"; 
        if(xhr.sendAsBinary) {
          // only firefox
          xhr.sendAsBinary(body);
        } else {
          // chrome (as in W3C)
          xhr.send(body);
        }
      };
      //reading file
      reader.readAsBinaryString(file);
    

    The code may not be 100% correct, but you get the idea.
    Your browser should support FileReader API, you can check it on html5test.com

    Hope this helps.

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

Sidebar

Related Questions

I'm using this jQuery Validation script to submit my form(s), but I need some
I have a form I am submitting using jQuery's ajaxSubmit function from the Forms
I'm using the jquery form plugin (http://jquery.malsup.com/form/) to show the results of a submitted
i am trying to save a file from chrome using AjaxSubmit. i got the
I am using jquery.form.js (version: 2.84) and in the below code, I see that
Easy points for someone willing to help a beginner. Using JQuery Form and Validation
I'm using jQuery.form plugin to .ajaxSubmit() between div's popping in and out of view
I have a big problem writing a small piece of code using JS/jQuery (don't
I'm creating a basic form with ajax submit using jquery framework. This is my
Using LINQ on collections, what is the difference between the following lines of code?

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.