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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:45:59+00:00 2026-05-28T07:45:59+00:00

Alright I’ve been creating some test code to try and clear the upload queue,

  • 0

Alright I’ve been creating some test code to try and clear the upload queue, but I just don’t know how to access the refresh() function from where I am. I’m using the jQuery UI widget as base to work from.
The part where I use INIT is giving me hell, I just can’t seem to figure out how to refresh() from within my json call. I hope you can enlighten me as apparently I suck at jQuery.

    var do_continue = false;

    $("#uploader").plupload({
    // General settings
    runtimes : 'html5,browserplus,silverlight,gears,html4',
    url : CI.base_url + 'private/ad/upload_ad_images',
    max_file_size : '2mb',
    max_file_count: 5, // user can add no more then 20 files at a time
    //chunk_size : '1mb',
    unique_names : true,
    multiple_queues : true,

    // Resize images on clientside if we can
    //resize : {width : 800, height : 600, quality : 90},

    // Rename files by clicking on their titles
    rename: true,

    // Sort files
    sortable: true,

    // Specify what files to browse for
    filters : [
        {title : "Image files", extensions : "jpg,gif,png"}
    ],

    // Flash settings
    flash_swf_url : CI.base_url + 'scripts/plupload/js/plupload.flash.swf',

    // Silverlight settings
    silverlight_xap_url : CI.base_url + 'scripts/plupload/js/plupload.silverlight.xap',
    // Post init events, bound after the internal events
    init : {
        QueueChanged: function(up) {
            // check for max photos here
            $.getJSON(CI.base_url + 'private/ad_ajax/count_uploaded_images/', function(data) {
            if (!data.message) {
                alert("no data found? - please contact us with this message.");
                do_continue = false;
            }else if(data.message != "go") {
                alert("Maximum photo uploads reached.");
                do_continue = false;
            }
            if (!do_continue) {
                $(this).refresh(); // -->> need something that works here
            }
            });
        }
    }
});
  • 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-28T07:45:59+00:00Added an answer on May 28, 2026 at 7:45 am
    $.getJSON(CI.base_url + 'private/ad_ajax/count_uploaded_images/', function(data) {
    if(data.message != "go") {
        alert("Maximum photo uploads reached.");
        do_continue = false;
        plupload.each(files, function(file) {
            up.removeFile(file);
        });
    }
    });
    

    Was the answer – up.refresh() etc did not work for some reason.

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

Sidebar

Related Questions

Alright, I wanna know why this code is working, I just realized that I
Alright, I'm injecting some code into another process using the CreateRemoteThread/LoadLibrary trick. I end
Alright I know there is a lot on here about this, but I haven't
Alright, I don't know if anyone has tried to do this yet, however. I
Alright, I have been doing the following (variable names have been changed): FileInputStream fis
Alright, I know how the fieldset / legend works out in HTML. Say you
Alright so i have been working on this Dynamic load of a spinner from
Alright, so I've looked around the web and haven't been able to find what
Alright, so I think I'm pretty close to having what I need, but I'm
Alright, I've been hacking around with GD Image for a couple of months, and

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.