1. #1
    Sencha User
    Join Date
    Sep 2008
    Posts
    118
    Vote Rating
    1
    RobWilson is on a distinguished road

      0  

    Default Unanswered: How to cancel a file upload and why can't I re-submit the same file?

    Unanswered: How to cancel a file upload and why can't I re-submit the same file?


    Hi,

    I have a Window with a form embedded within it (xtype:'form'), within that it has a single file-field (xtype:'filefield').

    Q1 - When I submit the form it uploads a CSV file and what I would like to do is give the user the ability to cancel the upload during the upload. How is this possible? I can't see any 'abort' or 'cancel' operations.

    Q2 - Additionally, I noticed that when an error is returned from my server and I try to re-submit the same file, I'm told that the file is 'empty' - it's as though the previously selected file is 'forgotten' by extjs? If I close my window and re-open it, select the file again, it works.

    This is using version 4.0.1a.

    Regards,
    Rob.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,094
    Answers
    3503
    Vote Rating
    855
    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


    When you submit a form that has a file field, it creates a <form> element and then submits that form which does not support canceling.
    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.

Thread Participants: 1

Tags for this Thread