1. #11
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Hope I get to see screenshots at least

    Working on progress events. Seems Firefox sends them but Webkit not. Good times when you have a little free time
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  2. #12
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    773
    Vote Rating
    28
    Steffen Hiller will become famous soon enough Steffen Hiller will become famous soon enough

      0  

    Default


    Hmm, not sure if I'm allowed to share screenshots, but I will report back if I do anything fancy code-wise.

    I'll ignore progress stuff for now. I think client uses Chrome anyway, and Chrome shows progress for uploads by default on the bottom left.

  3. #13
    Sencha Premium Member
    Join Date
    Apr 2007
    Posts
    92
    Vote Rating
    54
    bobmanc is a jewel in the rough bobmanc is a jewel in the rough bobmanc is a jewel in the rough

      0  

    Default


    I need to upload any kind of file so it would be great to be able to do an extjs form submit. Anyone know how to do this?

  4. #14
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by bobmanc View Post
    I need to upload any kind of file so it would be great to be able to do an extjs form submit. Anyone know how to do this?
    Using this plugin or just a file upload field? If file upload field then please create a new thread in the help section.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #15
    Sencha Premium Member
    Join Date
    Apr 2007
    Posts
    92
    Vote Rating
    54
    bobmanc is a jewel in the rough bobmanc is a jewel in the rough bobmanc is a jewel in the rough

      0  

    Default


    Using this plugin. I am able to upload through a form so that part is all set. The question is how do I grab the file from the plugin and somehow insert it into the form and submit it. Thanks.

  6. #16
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This plugin uses the File API, think you need to do some research first.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  7. #17
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Kherson
    Posts
    30
    Vote Rating
    0
    lufton is on a distinguished road

      0  

    Default Add some feature

    Add some feature


    Hi mitchellsimoens! I love this plugin and I use it for my project.
    What do you think about adding this:
    Code:
    Ext.define("Ext.plugin.extjs.FileDrop", {
        extend   : "Ext.AbstractPlugin",
        alias    : "plugin.filedrop",
    
    
        readType : "DataURL",
        clickable: true,
    
        init : function(cmp) {
            var me = this;
    
    
            cmp.addEvents({
                fileselected: true,
                dragover   : true,
    ...
    
    initFileDrop: function(cmp) {
            var me = this,
                el = me.el || cmp.getEl();
    
    
            el.on("dragover", me.onDragOver, me);
            el.on("drop", me.onDrop, me);
            if (me.clickable) {
                var file = document.createElement('input');
                file.setAttribute('type', 'file');
                file.setAttribute('title', 'Upload file');
                file.style.width = file.style.height = '100%';
                file.style.position = 'absolute';
                file.style.left = file.style.top = file.style.opacity = '0';
                file = new Ext.Element(file);
                file.on("change", me.onFileSelected, me);
                el.appendChild(file);
            }
        },
    
    onFileSelected: function(e) {
            e.stopEvent();
    
            var cmp = this.cmp,
                files = e.target.files,
                file,
                numFiles = files.length,
                i = 0;
            cmp.fireEvent("fileselected", cmp, e);
            for (; i < numFiles; i++) {
                file = files[i];
                this.readFile(file);
            }
        },
    To allow users set clickable - show select file dialog on click over component using this plugin, because in some browsers (safari on MacOS) this plugin didn't works.

  8. #18
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Kherson
    Posts
    30
    Vote Rating
    0
    lufton is on a distinguished road

      0  

    Default


    Up

  9. #19
    Sencha User
    Join Date
    Nov 2012
    Posts
    3
    Vote Rating
    0
    Robin-Hood is on a distinguished road

      0  

    Default File Source

    File Source


    Thank you for this, it works like a charm but I'm still learning and need a little help submitting multiple files with a form.
    all I want to do is take the dropped files and submit them to a url.

    sorry if this seems really basic but if you could help I would be very appreciative because I've been at this for quite a while.

  10. #20
    Sencha User
    Join Date
    Nov 2012
    Posts
    3
    Vote Rating
    0
    Robin-Hood is on a distinguished road

      0  

    Default


    I've been looking at the docs for a long time. I just wanted to clarify, I want to send the dropped files to a specified url with a form as a multi file post. Being that you can't change the value of a filefield xtype, how is this done?

Similar Threads

  1. Highcharts adapter and plugin for ExtJS
    By buz in forum Ext 3.x: User Extensions and Plugins
    Replies: 427
    Last Post: 18 Jul 2013, 9:03 AM
  2. Eclipse's Extjs plugin anybody knows one?
    By andredecotia in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 15 Dec 2010, 5:40 AM
  3. How to create plugin for ExtJS
    By martinfeng in forum Ext 3.x: User Extensions and Plugins
    Replies: 4
    Last Post: 7 Nov 2010, 9:16 AM
  4. rwt (a ruby on rails plugin for extjs)
    By twr in forum Community Discussion
    Replies: 1
    Last Post: 12 Feb 2009, 2:28 AM

Thread Participants: 7