Ext.Net fileupload field

  1. #1

    Ext.Net fileupload field

    Hi,

    I have setup the example to upload files from the Ext.Net samples.ext.net site. I have it working in terms of functionality. When I start hunting for the file I can't seem to find it. Where does the file go? It says upload successful but I can't find the file anywhere? I would appreciate it if someone could help me out.
  2. #2
    Hi,

    It should be downloaded in some default directory according to the browser settings.
  3. #3

    File location redirect

    Quote Originally Posted by Daniil View Post
    Hi,

    It should be downloaded in some default directory according to the browser settings.

    I have tried it but don't see anything in the Downloads folder or the root of the app. Can I tell the control where to put the file?
  4. #4
    No, it's impossible - JavaScript has no access to local file system.

    Please clarify - do you upload or download a file?
  5. #5

    Upload

    I'm trying to upload to server. Do I have to create a handler to stream the file to the server? If so, is there an example on how to do that?
  6. #6
    Yes, you should save a file like this.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void FileUploadField_FileSelected(object sender, DirectEventArgs e)
        {
            this.FileUploadField1.PostedFile.SaveAs("C:\\Documents\\TESTFILE.txt");
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:FileUploadField ID="FileUploadField1" runat="server" Width="300">
                <DirectEvents>
                    <FileSelected OnEvent="FileUploadField_FileSelected" IsUpload="true" />
                </DirectEvents>
            </ext:FileUploadField>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] [#92] FileUpload
    By Timothy in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: Jan 16, 2013, 3:44 AM
  2. Replies: 2
    Last Post: Aug 19, 2011, 1:36 PM
  3. Missing SaveAs Function FileUpload Field
    By BLOZZY in forum 1.x Help
    Replies: 0
    Last Post: Sep 17, 2010, 2:31 PM
  4. [CLOSED] Disable browse button of fileupload field
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 26, 2009, 10:44 AM
  5. bug in fileupload
    By pablisho in forum 1.x Help
    Replies: 0
    Last Post: Jul 01, 2009, 10:55 AM

Tags for this Thread

Posting Permissions