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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:30:32+00:00 2026-06-05T01:30:32+00:00

When using Valums Ajax file uploader, how can I trigger the upload? The default

  • 0

When using Valums Ajax file uploader, how can I trigger the upload?

The default behavior is for the upload to begin immediately after the user selects a file. I want to prevent this from happening, and instead trigger the upload when the user clicks a separate “Upload” button after they have selected a file.

I looked through the code and found that the upload begins on the change event attached to the file input. I began by adding return false; to to the onSubmit function, and then attaching a click event to another button that triggered the change event:

$('#startUpload').on('click', function() {  
    // some conditionals
    $('input[name="file"]').trigger('change');  
});

That doesn’t work. It just opens the file menu again.

How can I prevent the upload from occurring immediately after the user selects the file and instead trigger it when the user clicks another button?

  • 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-05T01:30:34+00:00Added an answer on June 5, 2026 at 1:30 am

    You will have to modify the file-uploader.js file for this. In line 309, modify the onChange function to return false. Then add the following function above it, so that the code becomes:

    startUpload: function(){
        this._onInputChange(this._button.getInput());
    },
    _createUploadButton: function(element){
        var self = this;
    
        return new qq.UploadButton({
            element: element,
            multiple: this._options.multiple && qq.UploadHandlerXhr.isSupported(),
            onChange: function(input){
                return false;
            }
        });
    },
    

    Then in your HTML file, within your button click or any other event, call

    uploader.startUpload();
    

    where uploader is the name of your qq.FileUploader() object.

    Hope that helps 🙂

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

Sidebar

Related Questions

I'm using Rails and valums file-uploader for ajax upload. In development all works flawlessly,
Want to upload a file using ajax for this using this uploader http://valums.com/ajax-upload/ and
I am using the Valums Ajax Uploader to upload a batch of files. We
I'm using valums ajax file-uploader My nodejs server side looks like this: fileStream =
I want to make valums/file-uploader run with django upload, using it with model fields
I am currently using Valums JQuery File Upload plugin. The plugin is very convenient
I'm using the AJAX plugin from Andris Valums: AJAX Upload ( http://valums.com/ajax-upload/ ) Copyright
I am using the Ajax.Upload plugin ( http://valums.com/ajax-upload/ ). I am trying to use
I'm using a Grails plugin for ajax upload, http://grails.org/plugin/ajax-uploader , that is directly based
hii i am using ajax file upload in this code <script type=text/javascript src=fileuploader.js></script> <script

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.