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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:46:47+00:00 2026-06-13T16:46:47+00:00

When uploaded files using valums ajax uploader we get the list of files with

  • 0

When uploaded files using valums ajax uploader we get the list of files with file name and file size. I wanted the list to come with file name, file size and a Delete link for the file. So that when the user clicks on delete the file should get out of the list that are displayed.
I was successful on getting the delete link on each file but as i have less javascript knowledge was unable to process as i wanted. if anybody can help would be great.
This is what i have done uptil now.

 function deleteme(id){
 //something like this
     var item = this._getItemByFileId(id);                
     qq.remove(this._find(item));
 }     

fileTemplate:'<li>' +
            '<span class="qq-upload-file"></span>' +
            '<span class="qq-upload-spinner"></span>' +
            '<span class="qq-upload-size"></span>' +
            '<a class="qq-upload-cancel" href="#">Cancel</a>' +
            '<span class="qq-upload-failed-text">Failed</span>' +
            '<a class="qq-upload-del-text" href="javascript:deleteme(this.id);">Delete</a>' +
            '</li>',

thanks in advance.

  • 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-13T16:46:48+00:00Added an answer on June 13, 2026 at 4:46 pm

    I was using the FileUploaderBasic version and faced the same problem. So I did a DIY remove

    Here is the full example:

    var $fub = $('#fine-uploader-basic'),
                                        $messages = $('#upload-messages');
    
                                    // try the basic uploader 
    
                                    var uploader = new qq.FileUploaderBasic({
                                            button: $fub[0],
                                            action: base_ajax_url + 'upload',
                                            debug: true,
                                            autoUpload: false,
                                            allowedExtensions: ['jpeg', 'jpg', 'gif', 'png'],
                                            sizeLimit: 204800, // 200 kB = 200 * 1024 bytes
                                            // the method name really should be onSelect 
                                            onSubmit: function(id, fileName) {
    
                                                var _self = this;
    
                                                var entry = $('<div id="file-' + id + '" class="alert" style="margin: 10px 0 0">' + fileName + ' <span class="qq-upload-cancel close">&times;</span></div>'
                                                    ).appendTo(
                                                        $messages[0]
                                                    ).find('.qq-upload-cancel').click(function() {
                                                        _self._storedFileIds.splice(_self._storedFileIds.indexOf(id) , 1);
                                                        $($(this).parent()).remove();
                                                    return false;
                                                    });
    
                                            },
                                            onUpload: function(id, fileName) {
                                                $('#file-' + id).addClass('alert-info')
                                                    .html('<img src="/sites/all/themes/pb_admin/images/loading.gif" alt="Initializing. Please hold."> ' +
                                                    'Initializing ' +
                                                    '"' + fileName + '"');
                                            },
                                            onProgress: function(id, fileName, loaded, total) {
                                                if (loaded < total) {
                                                  progress = Math.round(loaded / total * 100) + '% of ' + Math.round(total / 1024) + ' kB';
                                                  $('#file-' + id).removeClass('alert-info')
                                                                  .html('<img src="/sites/all/themes/pb_admin/images/loader.gif" alt="In progress. Please hold."> ' +
                                                                        'Uploading ' +
                                                                        '"' + fileName + '" ' +
                                                                        progress);
                                                } else {
                                                  $('#file-' + id).addClass('alert-info')
                                                                  .html('<img src="/sites/all/themes/pb_admin/images/loader.gif" alt="Saving. Please hold."> ' +
                                                                        'Saving ' +
                                                                        '"' + fileName + '"');
                                                }
                                            },
                                            onComplete: function(id, fileName, responseJSON) {
                                                if (responseJSON.success) {
                                                  $('#file-' + id).removeClass('alert-info')
                                                                  .addClass('alert-success')
                                                                  .html('<i class="icon-ok"></i> ' +
                                                                        'Successfully saved ' +
                                                                        '"' + fileName + '"');
                                                } else {
                                                  $('#file-' + id).removeClass('alert-info')
                                                                  .addClass('alert-error')
                                                                  .html('<i class="icon-exclamation-sign"></i> ' +
                                                                        'Error with ' +
                                                                        '"' + fileName + '": ' +
                                                                        responseJSON.error);
                                                }
                                            }
                                         });
    

    (The name onSubmit kinda questionable … anyway)

    I tried to call the onCancel method (but throw exception that is undefined).

    Then this one works – by remove the id from the _storedFileIds array. And that’s it.

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

Sidebar

Related Questions

I am using valums-file-uploader plugin. It allows me to upload files using ajax. I
I'm using this pluging to upload files: https://github.com/valums/file-uploader But now I starts the upload
I'm using Rails and valums file-uploader for ajax upload. In development all works flawlessly,
I am using the Valums Ajax Uploader to upload a batch of files. We
I am using the Valum AJAX upload script from: https://github.com/valums/file-uploader I am having trouble
Want to upload a file using ajax for this using this uploader http://valums.com/ajax-upload/ and
I'm using valums ajax file-uploader My nodejs server side looks like this: fileStream =
I am using the file uploader plugin (from: https://github.com/valums/file-uploader ) to upload files to
When using Valums Ajax file uploader, how can I trigger the upload? The default
I am using valums file-uploader to upload files. This works great if my Spring

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.