Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Ext.form.field.File - how to accept multiple files and how to access file itself

  1. #11
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    Quote Originally Posted by [email protected] View Post
    Did you open a bug report?
    I stopped doing that here on the forum, the bugs forum seems to go unresponsive.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  2. #12
    Sencha User
    Join Date
    Oct 2017
    Posts
    26
    Answers
    1

    Default

    Mitchell, thanks! I have a question for you. I also noticed this typo and tried to override Ext.field.File like so:

    Code:
    Ext.define('override.field.File', {
            override: 'Ext.field.File',
    
            proxyConfig: {
                fileButton: [
                    /**
                     * @cfg multiple
                     * @inheritdoc Ext.field.FileButton#multiple
                     */
                    'multiple',
         
                    /**
                     * @cfg accept
                     * @inheritdoc Ext.field.FileButton#accept
                     */
                    'accept',
         
                    /**
                     * @cfg capture
                     * @inheritdoc Ext.field.FileButton#capture
                     */
                    'capture'
                ]
            },
    });
    But that override did nothing. And i'm puzzled, why.

  3. #13
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    Mixins are mixed into the classes when the class is being defined and the ConfigProxy mixin processes the proxyConfig at the time of being mixed into the class. An override applies onto the class after it has been defined and therefore too late, the ConfigProxy mixin has already processed the class when the override is being applied.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #14
    Sencha Premium User
    Join Date
    Nov 2017
    Posts
    3

    Default

    I just opened a ticket at sencha support regarding that issue. Lets see how they respond.
    @Mitchell Thanks for the fix and explanation

  5. #15
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    754
    Answers
    7

    Default

    really Ext.field.File not Ext.form.field.File?

    Bye, Dumbledore

  6. #16
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    Quote Originally Posted by Dumbledore View Post
    really Ext.field.File not Ext.form.field.File?

    Bye, Dumbledore
    Yes, since Sencha Touch 2 (where modern toolkit came from) the fields were moved out of the form namespace and this was kept when merged into Ext JS.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  7. #17
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    754
    Answers
    7

    Default

    ah, ok. Thank you for clarifying this!

  8. #18
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    FYI, this has been fixed for last couple nightlies for 6.5.4 and 6.6.0
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  9. #19
    Sencha User
    Join Date
    Dec 2010
    Location
    GMT+1 - DST+1
    Posts
    75
    Answers
    1

    Default

    How about form.submit?
    It considers only the last item. What to do, to transfer all selected files through url?
    Thx.

  10. #20
    Sencha User
    Join Date
    Dec 2010
    Location
    GMT+1 - DST+1
    Posts
    75
    Answers
    1

    Default

    Quote Originally Posted by squalo View Post
    How about form.submit?
    It considers only the last item. What to do, to transfer all selected files through url?
    Thx.
    to be more precise:
    $_FILES got only one file in the php array on serverside, although these parameters were sent:

    Example with two files:

    Code:
    -----------------------------19694366011210205917882498094
    Content-Disposition: form-data; name="preFix"
    
    invBosch
    -----------------------------19694366011210205917882498094
    Content-Disposition: form-data; name="upload_dir"
    
    /media/files
    -----------------------------19694366011210205917882498094
    Content-Disposition: form-data; name="type"
    
    2
    -----------------------------19694366011210205917882498094
    Content-Disposition: form-data; name="file"; filename="test2.txt"
    Content-Type: text/plain
    
    wqewqewq
    
    -----------------------------19694366011210205917882498094
    Content-Disposition: form-data; name="file"; filename="test1.txt"
    Content-Type: text/plain
    
    121
    
    -----------------------------19694366011210205917882498094--
    Furtheron, appreciating any hints.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 1
    Last Post: 9 Oct 2017, 8:55 AM
  2. Replies: 1
    Last Post: 9 Mar 2012, 11:02 AM
  3. Replies: 1
    Last Post: 17 Oct 2011, 11:04 PM
  4. Ext.form.field.File, specify acceptable file extensions
    By ucabazz in forum Ext: Discussion
    Replies: 0
    Last Post: 3 May 2011, 5:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •