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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:16:10+00:00 2026-06-10T06:16:10+00:00

I am using uploadify plugin to upload files and update them in mysql database.

  • 0

I am using uploadify plugin to upload files and update them in mysql database.

Smaller files are getting uploaded easily i.e. less then 1 mb files are getting uploaded and updated in the database.
But bigger files that is more than 4 mb or so are not getting uploaded.

Here is my code:
`

$j('#file_upload').uploadify({
        auto : false,
        'swf'      : 'uploadify/uploadify.swf',
        'uploader' : 'newuploadify.php',
        // Put your options here
        'queueSizeLimit' : 1,

        'multi'    : false,
        'buttonText' : 'Add Photo',
        'fileTypeDesc' : 'Image Files',
        'fileTypeExts' : '*.gif; *.jpg; *.png; *.JPG',
        'fileSizeLimit' : '10MB',
        'onClearQueue' : function(queueItemCount) {
               $j("#photocancelbtn").hide();
               $j("#photouploadstartbtn").hide();
        },
        'onSelect' : function(file) {
              $j("#photocancelbtn").show();
              $j("#photouploadstartbtn").show();
        },

        'onUploadSuccess' : function(file, data, response) {
                $j("#photocancelbtn").hide();
               $j("#photouploadstartbtn").hide();

               changeBtnText();
    }


    }); /* closing uploadify line*/

}); /* closing funciton line*/
});

`

The uploadify script:

`

<?php
/*
Uploadify
Copyright (c) 2012 Reactive Apps, Ronnie Garcia
Released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
// Define a destination
require('newconnect.php');
$targetFolder = '/Mysite/uploadify/'; // Relative to the root

if (!empty($_FILES)) {
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;
    $targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name'];

    // Validate the file type
    $fileTypes = array('jpg','jpeg','gif','png'); // File extensions
    $fileParts = pathinfo($_FILES['Filedata']['name']);

    if (in_array($fileParts['extension'],$fileTypes)) {
    $fp     = fopen($tempFile, 'r');
    $data = fread($fp, filesize($tempFile));
    fclose($fp);
    $query = $mysqli->prepare("Update help.posts set Photo=? where Pid=?");
           $query->bind_param("si", $data,$pid);
           $pid=3;
           $query->execute();



    } else {
        echo 'Invalid file type.';
    }
}
?>

`

Please let me know whats the error. I can upload smaller files but not larger files, although the upload limit i have set is 10 mb and also updated php.ini max-file-size to 10mb

  • 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-10T06:16:11+00:00Added an answer on June 10, 2026 at 6:16 am

    Ok it got solved! The problem was in the file format. The script was not taking .JPG (in caps) but was taking .jpg

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

Sidebar

Related Questions

I'm trying to upload files to server using Uploadify script and then show them
I'm using the uploadify jquery plugin to upload multiple files. Everything works fine, but
i am using the jQuery Plugin Uploadify to upload files, and i store the
I'm using the Uploadify plugin to upload files to my server, and I want
I am uploading files using jQuery uploadify plugin. All files are uploaded into same
I am using the Uploadify Plugin to Upload files. although this might be a
I am using uploadify plugin of jquery and have set multiple files upload to
I have a plugin for uploading files using jquery uploadify. After calling a method
I am using Uploadify to upload files. Problem is, I need to inform users
I have a problem. I'm using the jQuery plugin Uploadify v. 2.1.4 to 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.