[CLOSED] FileUploadFile cleared right after submit

  1. #1

    [CLOSED] FileUploadFile cleared right after submit

    Sample to reproduce below. Select a file then hit save. The content of the FileUploadField textbox is cleared and the empty text is shown. Am I missing something?

    I tested with the latest SVN trunk as of right now and I also reproduced the problem in Ext.net 2.1.1.

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html>
    <head id="Head1" runat="server">
        <title>FormPanel - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
            #fi-button-msg {
                border: 2px solid #ccc;
                padding: 5px 10px;
                background: #eee;
                margin: 5px;
                float: left;
        <ext:ResourceManager ID="ResourceManager1" runat="server" />    
        <form id="Form1" runat="server">
            <h2>Form Example</h2>
            <p>The FileUploadField can also be used in standard form layouts, with support for anchoring, validation (the
                field is required in this example), empty text, etc.</p>
                Title="File Upload Form"
                PaddingSummary="10px 10px 0 10px"
                    <ext:Parameter Name="anchor" Value="95%" Mode="Value" />
                    <ext:Parameter Name="allowBlank" Value="false" Mode="Raw" />
                    <ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
                        EmptyText="Select an image"
                    <ext:Button ID="SaveButton" runat="server" Text="Save" >
                            <Click Handler="#{BasicForm}.getForm().submit();">
                    <ext:Button ID="Button2" runat="server" Text="Reset">
                            <Click Handler="#{BasicForm}.getForm().reset();" />
    Last edited by Daniil; Jan 15, 2013 at 5:03 AM. Reason: [CLOSED]
  2. #2
    After debugging more, it seems that the problem is in this source, ext-4.1.1a\src\form\field\File.js, the call to the field reset().

        extractFileInput: function() {
            var fileInput = this.fileInputEl.dom;
            return fileInput;
    I created this bug:
  3. #3
    Hi @bogc,

    I reported it earlier.

    Here is a related Ext.NET forum thread.

    Your post led us to know that they already added the clearOnSubmit option. Thank you.

    We added a respective server property for FileUploadField (trunk).
  4. #4
    Thank you, Daniil.

    Just as a side note I searched both forums (sencha and ext.net) for an issue related - I thought I can't be the first one finding this, and I was right :-) - but I couldn't find anything so I decided to create the bug report. I searched for: FileUploadField clear. The other thread that you mentioned didn't come up because it didn't contain FileUploadField. I often use the Search Forum feature which I think it is not as good as the google search. For instance google might decide to search substrings and infer cleared->clear or the other way.

    Thanks again
  5. #5
    First of all, it is totally not a problem that you posted it. It even gave as a real benefit - we knew that the clearOnSubmit option appeared.

    It is a common case for me when I reports duplicates to Sencha forums. Recently, I even reported a duplicate of my own report:)

    Quote Originally Posted by bogc View Post
    I often use the Search Forum feature which I think it is not as good as the google search.
    Please notice that Google search is available for Ext.NET forums. The "Search" box at the top on the right.
  6. #6
    Is there a way to search only the Ext.Net 2.x posts using the google search you suggested?
    Last edited by bogc; Jan 15, 2013 at 6:20 AM.
  7. #7
    I don't know such an option. I am afraid there is no.

Similar Threads

  1. Replies: 5
    Last Post: Oct 22, 2012, 11:43 AM
  2. Replies: 1
    Last Post: Jul 25, 2012, 10:52 AM
  3. [FIXED] DisabledDates not cleared
    By wazige in forum Bugs
    Replies: 2
    Last Post: Mar 11, 2011, 2:21 PM
  4. Replies: 0
    Last Post: Aug 31, 2010, 5:29 AM
  5. [CLOSED] Submit gridpanel data in form submit
    By jchau in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 14, 2010, 8:25 PM

Posting Permissions