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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:53:33+00:00 2026-05-24T01:53:33+00:00

jQuery(document).ready(function() { jQuery(#file_upload).uploadify({ ‘uploader’ : ‘/wp-content/plugins/amazon-s3-simple-upload-form/files/uploadify/uploadify.swf’, ‘script’ : ‘/wp-content/plugins/amazon-s3-simple-upload-form/files/uploadify/uploadify.php’, ‘folder’ : ‘/uploads’, ‘auto’ :

  • 0
    jQuery(document).ready(function() {
        jQuery("#file_upload").uploadify({
            'uploader'      : '/wp-content/plugins/amazon-s3-simple-upload-form/files/uploadify/uploadify.swf',
            'script'    : '/wp-content/plugins/amazon-s3-simple-upload-form/files/uploadify/uploadify.php',
            'folder'    : '/uploads',
            'auto'      : true,
            'buttonText'    : 'Browse',
            'cancelImg'     : '/wp-content/plugins/amazon-s3-simple-upload-form/files/uploadify/cancel.png',
            'fileExt'       : '*.*',
            'fileDataName'  : 'file_upload',
            'simUploadLimit': 2,
            'multi'         : true,
            'auto'          : true,
            'onError' : function(event, ID, fileObj, errorObj) {alert(errorObj.type+"::"+errorObj.info);
},
            'onComplete'    : function(event, ID, file, response, data) { console.log(file);}
        });
    });

That is my JS File….

<?php
/*
Uploadify v2.1.4
Release Date: November 8, 2010

Copyright (c) 2010 Ronnie Garcia, Travis Nickels

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
include_once($_SERVER['DOCUMENT_ROOT'].'/wp-config.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/wp-load.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/wp-includes/wp-db.php');


error_reporting(E_ALL);
ini_set("display_errors", 1); 

if (!empty($_FILES)) {

    $tempFile = $_FILES['file_upload']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
    $targetFile =  str_replace('//','/',$targetPath) . $_FILES['file_upload']['name'];
    $fileTypes = array('jpg','jpeg','gif','png'); // File extensions

                global $current_user; 
                $current_user = wp_get_current_user();
                $userid = $current_user->ID;
                $username = $current_user->user_login;
                $email =  $current_user->user_email;
                $first_name = $current_user->user_firstname;
                $last_name = $current_user->user_lastname;
                $upload_time = date( 'Y-m-d H:i:s', time());
                $upload_url =  $targetFile;
                $s3userIP = $_SERVER["REMOTE_ADDR"];
                $description = $_POST['filedesc'];

if  (move_uploaded_file($tempFile,$targetFile))
{
    $insertuser = mysql_query("INSERT INTO wp_110504s3userDBinfo( upload_time, user_name, email_add, description, upload_url,s3_userIP) values  ('$upload_time','".$username."', '".$email."', '".$description."', '".$upload_url."', '".$s3userIP."')") or die(mysql_error());
                   }

    }
?>

That is Uploadfiy.php
And the url is Uploadify URL is

Actually i am using worpress cms i want this into wordpress please check whats problem

  • 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-24T01:53:35+00:00Added an answer on May 24, 2026 at 1:53 am

    the problem is in your uploadify.php script. you must modify your input file name to Filedata or you must modify in uploadify.php $_FILES['Filedata'] with $_FILES['file_upload']

    if (!empty($_FILES)) {
        $tempFile = $_FILES['file_upload']['tmp_name'];
        $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
        $targetFile =  str_replace('//','/',$targetPath) . $_FILES['file_upload']['name'];
        move_uploaded_file($tempFile,$targetFile);
        echo str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);
    
    }
    

    (file_upload is your <input type='file' id='file_upload' name='file_upload' />)

    edited:

    you must add this to your script:

    'onSelect'      : function(event,ID,fileObj) {
    
              $('#file_upload').uploadifySettings('scriptData',{filedesc:$('#filedesc').val()});
    
            }
    

    like this:

    jQuery("#file_upload").uploadify({
            'uploader'      :       'uploadify.swf',
                 'script'               :   'uploadify.php',
            'folder'                :   '/wp-content/uploads',
            'auto'              :   true,
            'buttonText'            :   'Browse',
            'cancelImg'     :   'cancel.png',
            'fileExt'       :   '*.*',
            'fileDataName'      :   'file_upload',
            'simUploadLimit'        :   2,
            'multi'         :   true,
            'auto'          :   true,
            'method'        :       'post',
            'onComplete'    :   function(event, ID, file, response, data) {},
    
            'onSelect'      : function(event,ID,fileObj) {
    
              $('#file_upload').uploadifySettings('scriptData',{filedesc:$('#filedesc').val()});
    
            }
    
        });
    

    your problem was that you were setting the scriptData on init, and at that time your description was null. So I updated the scriptData value onSelect event

    you get errors but you can’t read them, so put them into txt file.
    put this in your uploadify.php after this line

    $insertuser = mysql_query("INSERT INTO wp_110504s3userDBinfo( upload_time, user_name, email_add, description, upload_url,s3_userIP) values  ('$upload_time','".$username."', '".$email."', '".$description."', '".$upload_url."', '".$s3userIP."')") or die(mysql_error());
    
        $flname= "testFile.txt";
        $flHandle= fopen($flname, 'w') or die("can't open file");
        $wr = fwrite($flHandle,mysql_errors());
        fclose($ourFileHandle);
    

    if you’re running this on a server(not localhost on windows) you have to set permissions

    for this script. After this open the txt file and read the errors. If you want to be sure that the parameters are received correctly by php, you can make a dir with the description sent name.

    in uploadify: mkdir($_POST[‘filedesc’]);

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

Sidebar

Related Questions

Jquery has a great language construct that looks like this: $(document).ready(function() { $(a).click(function() {
I have created a function outside of $(document).ready() , but am still using jQuery
I've got a simple HTML file upload form. I'm using the jQuery validation plugin
jQuery(document).ready(function(){ // Set the data text var dataText = { name: 'John', time: '2pm'
I have the following in my (document).ready function: replace_fav_url(); and the jQuery function: function
I'm using Jquery colorbox to implement a popup windows. <script> $(document).ready(function(){ $.colorbox({innerWidth:600px, innerHeight:520px, iframe:true,href:/notice.php});
I would like to execute the jQuery $(document).ready() in a drupal site. While i
I am using 'Uploadify' JQuery plugin for file upload. I read the documentation and
I'm using jQuery form plugin to upload files. The plugin uses a hidden iframe
I already have a jQuery(document).ready fragment defined. Since I'm working on a large-scale modular

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.