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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:41:36+00:00 2026-06-14T14:41:36+00:00

I’m using jQuery file upload plugin i have read all the docs provided. there

  • 0

I’m using jQuery file upload plugin

i have read all the docs provided. there is a php integration class but the class is so complicated and not commented at all i just want how to receive the JSON Data and response to the plugin.

because i want a simple implementation just receive the $_FILES array and upload files with move uploaded files. this is the simple plugin:

$('#fileupload').fileupload({

     dataType: 'json',
  done: function (e, data) {
      $.each(data.result, function (index, file) {
        $('<p/>').text(file.name).appendTo(document.body);
      });
  }
});

and the html is:

   <input id="fileupload" type="file" name="files[]" data-url="server/php/" multiple>

the question is how to receive the $_FILES array from this plugin and response to it ???

please could someone help me? just a simple code snippet and i will do the rest

  • 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-14T14:41:37+00:00Added an answer on June 14, 2026 at 2:41 pm

    Ok, getting the data on the php-side:

    This should be something like:

    <?php
    foreach( $_FILES as $f )
    {
        echo "name = ".$f['name'][0]."\n";
        echo "type = ".$f['type'][0]."\n";
        echo "tmp_name = ".$f['tmp_name'][0]."\n";
        echo "error = ".$f['error'][0]."\n";
        echo "size = ".$f['size'][0]."\n";
    
    }
    ?>
    

    If it doesn’t work (in your php handler):

    # ...
    error_log( print_r( $_REQUEST, true ) )
    error_log( print_r( $_FILES, true ) )
    # ...
    

    The output is written to the error log of your server. It should look somewhat like:

    # $_REQUEST
    array(0) {
    }
    
    # $_FILES
    array(1) {
      ["files"]=>
      array(5) {
        ["name"]=>
        array(1) {
          [0]=>
          string(30) "some.pdf"
        }
        ["type"]=>
        array(1) {
          [0]=>
          string(15) "application/pdf"
        }
        ["tmp_name"]=>
        array(1) {
          [0]=>
          string(14) "/tmp/phpkqOz2M"
        }
        ["error"]=>
        array(1) {
          [0]=>
          int(0)
        }
        ["size"]=>
        array(1) {
          [0]=>
          int(51869)
        }
      }
    }
    

    You will have to walk the array of $_FILES and move each one to where to store it…

    foreach( $_FILES as $f ){
        move_uploaded_file( $f['tmp_name'][0], './some/path/'.$f['name'][0] );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am reading a book about Javascript and jQuery and using one of the
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I am using Paperclip to handle profile photo uploads in my app. They upload

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.