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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:33:39+00:00 2026-06-04T15:33:39+00:00

I have a plupload instance based on the custom example from the website in

  • 0

I have a plupload instance based on the custom example from the website in place, it is working flawlessly except for displaying error messages that come from the server side upload script (upload.php from the examples folder in the download).

Local error messages are being displayed, for instance if i try to upload a file type that has been restricted, i get the error message i’m expecting, however, server side messages just aren’t being shown.

I know the upload.php file is being triggered properly as my uploads are processed successfully, and i have set a sleep function to also verify the file is being requested.
At the minute I have simply placed to lines at the top of my upload.php to assist with debugging which simply sleep for 10 seconds and return an error message, this still does not work.

upload.php
    sleep(10);
    die('{"jsonrpc" : "2.0", "error" : {"code": 500, "message": "THIS IS AN ERROR."}, "id" : "id"}');
...(Rest of normal upload.php file)...

The javascript I am using is included below, any help you guys could give would be greatly appreciated as I have spend too long on this already and the issue is holding me back from being able to push my code live.

Thanks,

Alex

// Fanart
$(function() {
var fanart_uploader = new plupload.Uploader({
    runtimes : 'html5,flash,html4',
    browse_button : 'fanart_pickfiles',
    container : 'fanart_container',
    drop_element : 'fanart_drop',
    chunk_size : '1mb',
    max_file_size : '8mb',
    url : '/upload.php?gameid=<?= $gameid ?>&arttype=fanart',
    flash_swf_url : '/js/plupload/js/plupload.flash.swf',
    silverlight_xap_url : '/js/plupload/js/plupload.silverlight.xap',
    filters : [
        {title : "Image files", extensions : "jpg,png"},
    ]
});

fanart_uploader.bind('Init', function(up, params) {
    $('#fanart_runtime').html("You are using " + params.runtime);
});

$('#fanart_uploadfiles').click(function(e) {
    fanart_uploader.start();
    e.preventDefault();
});

fanart_uploader.init();

fanart_uploader.bind('FilesAdded', function(up, files) {
    $.each(files, function(i, file) {
        $('#fanart_filelist').append(
            '<div style="padding: 4px; margin: 3px; border: 1px dotted #fff; border-radius: 6px; background-color: #333;" id="' + file.id + '"><img class="tick" src=\"<?= $baseurl ?>/images/common/icons/tick_16.png\" style=\"display: none; vertical-align: -2px;\" />' +
            file.name + ' <em>(' + plupload.formatSize(file.size) + ')</em> <div style=\"margin: auto; margin-top: 3px; width: 200px; height: 20px; border: 1px solid #fff; border-radius: 6px; background-color: #222;\"><div class="progressbar" style=\"width: 0px; height: 16px; padding: 2px 0px; background-color: #ccc; border-radius: 6px; text-align: center;\"><b style="font-size: 16px; color: #222;"></b></div></div>' +
        '</div>');
    });

    up.refresh(); // Reposition Flash/Silverlight
});

fanart_uploader.bind('UploadProgress', function(up, file) {
    $('#' + file.id + " b").html(file.percent + "%");
    $('#' + file.id + " .progressbar").css("width", (file.percent * 2));
});

fanart_uploader.bind('Error', function(up, err) {
    $('#fanart_filelist').append("<div>Error: " + err.code +
        ", Message: " + err.message +
        (err.file ? ", File: " + err.file.name : "") +
        "</div>"
    );

    up.refresh(); // Reposition Flash/Silverlight
});

fanart_uploader.bind('FileUploaded', function(up, file) {
    $('#' + file.id + " .tick").show();
});
});
  • 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-04T15:33:41+00:00Added an answer on June 4, 2026 at 3:33 pm

    And here is the answer you linked to:

    NM, Answered my own question…

    It seems my plUpload instance relieves the server response which is a
    JSON string into a JS object which can be accessed through the
    “FileUploaded” event.

    This is a code example for anyone else who needs this answer.

    fanart_uploader.bind('FileUploaded', function(up, file, info) {
        $('#' + file.id + " .tick").show();
        printObject(info);
    
        var response = jQuery.parseJSON(info.response);
    
        alert(response.error.message);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have you ever seen any of there error messages? -- SQL Server 2000 Could
I have an event handler for when an error is raised in Plupload: Error:
Have a website project in MVC3 C # where I retrieve information from the
I have created a custom uploader using Plupload's core api and it works well
Have someone tried out DeCAL in Delphi 2009? I'm thinking about upgrading from 2007,
have not tested on windows. but in ubuntu when u disconnect from the network,
**Have it working now. I forgot to populate the Array List. How embarrassing. I'm
Have converted devise new session from erb to Haml but doens't work, this is
have anyone can tell me what syntax error on this actionscript (actionscript3.0)? var rotY:
I have a div container where I am displaying multiple images and now I

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.