FILES DESTINATION

Last post 04-05-2011, 3:36 PM by Eric. 2 replies.
Sort Posts: Previous Next
  •  04-05-2011, 10:32 AM 67002

    FILES DESTINATION

    I am a new user of this software. When installed on my site, It allows me to select files from their folder and starts to upload them. Then an Error is thrown "Unable to read beyond the end of the stream". What action do I need to take, please ?
     
    When I installed the software, I could not find where I could insruct the code to define the destination folder. I want the files to go into a folder called \Hold. 
     
    As a result of an earlier error which said that \UpholderTemp was missing, I added a folder of this name to see what would happen and I find that the files are uploaded into this, but that they have a strange name starting with persisted... and ending with the original file name but with the extension .resx.
     
     
  •  04-05-2011, 3:36 PM 67006 in reply to 67002

    Re: FILES DESTINATION

    -
  •  04-05-2011, 3:36 PM 67007 in reply to 67002

    Re: FILES DESTINATION

    Dear DavidMorley,
     
    Temporary files use .resx as extension name,you can use the highlighted line to copy or move uploaded files to destination folder, it will use original file name,

    <%@ Page Language="C#" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">
        void InsertMsg(string msg)
        {
            ListBoxEvents.Items.Insert(0, msg);
            ListBoxEvents.SelectedIndex = 0;
        }
        void Uploader_FileUploaded(object sender, UploaderEventArgs args)
        {
             InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");

            //Copys the uploaded file to a new location.
            //args.CopyTo("c:\\temp\\"+args.FileName);
           //args.MoveTo("c:\\temp\\"+args.FileName);
            //You can also open the uploaded file's data stream.
            //System.IO.Stream data = args.OpenStream();
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Selecting multiple files for upload</title>
        <link rel="stylesheet" href="demo.css" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
            <div class="content">
                <h2>
                    Selecting multiple files for upload</h2>
                <p>
                    Select multiple files in the file browser dialog then upload them at once</p>
                <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Upload Multiple Files (Max 10M)"
                    MultipleFilesUpload="true" UploadAddonButtonMode="Replace" OnFileUploaded="Uploader_FileUploaded">
                    <ValidateOption MaxSizeKB="10240" />
                </CuteWebUI:Uploader>
                <br />
                <br />
                <div>
                    Server Trace:
                    <br />
                    <asp:ListBox runat="server" ID="ListBoxEvents" Width="400"></asp:ListBox>
                </div>
            </div>
        </form>
    </body>
    </html>
    Thank you for asking
View as RSS news feed in XML