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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:58:50+00:00 2026-06-17T23:58:50+00:00

I have recently tried using http://malsup.com/jquery/form/#file-upload for file upload, but I’m not entirely sure

  • 0

I have recently tried using http://malsup.com/jquery/form/#file-upload for file upload, but I’m not entirely sure how to upload the image to a certain folder on the server.

Heres the jQuery:

(function() {

var bar = $('.bar');
var percent = $('.percent');
var status = $('#status');

$('form').ajaxForm({
    beforeSend: function() {
        status.empty();
        var percentVal = '0%';
        bar.width(percentVal)
        percent.html(percentVal);
    },
    uploadProgress: function(event, position, total, percentComplete) {
        var percentVal = percentComplete + '%';
        bar.width(percentVal)
        percent.html(percentVal);
        //console.log(percentVal, position, total);
    },
    complete: function(xhr) {
        status.html(xhr.responseText);
    }
}); 

})();

and then the HTML:

<h1>File Upload Progress Demo #3</h1>
<code>&lt;input type="file" name="myfile[]"></code><br>
<code>&lt;input type="file" name="myfile[]"></code><br>
<code>&lt;input type="file" name="myfile[]"></code>
<form action="files-raw.php" method="post" enctype="multipart/form-data">
    <input type="file" name="myfile[]"><br>
    <input type="file" name="myfile[]"><br>
    <input type="file" name="myfile[]"><br>
    <input type="submit" value="Upload File to Server">
</form>

<div class="progress">
    <div class="bar"></div >
    <div class="percent">0%</div >
</div>

<div id="status"></div>
  • 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-17T23:58:51+00:00Added an answer on June 17, 2026 at 11:58 pm

    The server side code is responsible for save the uploaded files to the server, As you are using PHP you can access the file through $_FILES["myfile"]. I assume you want code like this,

    $newdirectory = "/your/directory";
    $count = 0;
    foreach ($_FILES['myfile']['name'] as $filename)
    {
        $temp = $_FILES['myfile']['tmp_name'][$count];
        move_uploaded_file($temp, $newdirectory . '/' . basename($filename));
        $count++;
    }
    

    This should do as you are asking. More info on handling uploads here and on move_uploaded_file here

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

Sidebar

Related Questions

Referring to the plugin: http://malsup.com/jquery/form/#getting-started I've recently tried to upgrade from old v2.28 to
recently google webmaster tools has shown that i have a duplicate title tag http://www.mydomain.com/root_folder/mypage.htm
I have recently begun learning the Win32 API using this tutorial: http://www.winprog.org/tutorial/ (though I'm
I have recently upgraded to the RC versions of the WebApi using Nuget but
I have been using Spring Security 2.x for some time now, but recently I
i've recently tried to get some Response from an URL using jQuery. Therefore I
I recently purchased a security certificate for a website valid for www.example.com but not
I have recently tried using the Silverlight NUnit Project template (the one from Jamie
I've been working on website recently and have come across a major problem :http://jimbob.webatu.com/index.html(you'll
I have recently come across noty as a jquery plugin as I do not

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.