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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:00:58+00:00 2026-06-03T03:00:58+00:00

I can’t find any docs about creating dojox/form/Uploader programmatically. I tried it by myself,

  • 0

I can’t find any docs about creating dojox/form/Uploader programmatically. I tried it by myself, but it looks like that plugin registering mechanism is somehow broken.

require([
    "dojo/dom-construct",
    "dijit/form/Button",
    "dojox/form/Uploader",
    "dojox/form/uploader/FileList",
    "dojox/form/uploader/plugins/IFrame",
    "dojo/domReady!"
    ], function(domConstruct, Button, Uploader, UploaderFileList) {

   var form = domConstruct.create('form', {
        method: 'post',
        enctype: 'multipart/form-data',
        class: 'Uploader'
    }, document.body);     

    var up = new Uploader({
        label: 'Pick files',
        multiple: true,
        url: '/echo/json/'
    }).placeAt(form);

    var list = new UploaderFileList({
        uploader: up
    }).placeAt(form);

    var btn = new Button({
        type: 'submit',
        label: 'upload',
        onClick: function() {
            up.upload();
        }
    }).placeAt(form);


    btn.startup();
    up.startup();
    list.startup();

});​

Example on jsfiddle here.

As far as I understand, source code of dojox/form/Uploader and dojox/form/uploader/plugins/IFrame, the plugin is registered via dojox.form.addUploaderPlugin function, which redeclares the Uploader widget class using self and plugged plugins as its predecessors.
But the key method “upload” of Uploader widget never gets overridden by HTML5 plugin (which is included automatically with Iframe plugin).

Is this bug? Or I am doing something wrong?

Thanks for any help!

  • 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-03T03:00:59+00:00Added an answer on June 3, 2026 at 3:00 am

    In short; use new dojox.form.Uploader instead of the pulled in variable, otherwise the plugin extending does not apply.

    Reason being, you would see programmer doing following in the addUploaderPlugin:

    dojox.form.UploaderOrg = dojox.form.Uploader;
    var extensions = [dojox.form.UploaderOrg];
    dojox.form.addUploaderPlugin = function(plug){
    
                extensions.push(plug);
                declare("dojox.form.Uploader", extensions, {});
        }
    

    The class that AMD loader returns is and will allways be dojox.form.UploaderOrg and does not know about the extended plugins.

    Change to following:

    var up = new dojox.form.Uploader({
        label: 'Pick files',
        multiple: true,
        url: '/echo/json/'
    }).placeAt(form);
    

    And make sure you have not set djConfig.publishRequireResult = false

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

Sidebar

Related Questions

Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can someone please explain how Read/Show works.. I cannot find any tutorials on it.
Can any one tell me clearly why ? Reading is simple in ArrayList,( we
Can anyone help me trying to find out why this doesn't work. The brushes
Can i get the source code for a WAMP stack installer somewhere? Any help
Can somebody point me to a resource that explains how to go about having
Can any one please tell me what is the difference between Task and Process
Can anybody give me a hint about how to load product's media gallery along
Can anyone help me find a software stack for doing near real time video
Can't figure what I am doing wrong. When I post my form there are

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.