temp file path

Last post 06-01-2009, 1:33 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  06-01-2009, 5:14 AM 52694

    temp file path

    Hi First time with this product
     
    I'm getting the message:
     
    ---------------------------
    Windows Internet Explorer
    ---------------------------
    Unable to find the uploaded file in directory : C:\Users\Ian Pettman\AppData\Local\Temp\AjaxUploaderTemp
    ---------------------------
    OK  
    ---------------------------
     
    (Same in firefox)
     
    Code is (called in load complete):
     

    Dim sUploadTempPath As String = Tools.Settings("FileUploadTempPath")

    If sUploadTempPath <> "" Then

    Uploader1.TempDirectory = sUploadTempPath

    Uploader1.AutoUseSystemTempFolder = False

    Else

    Uploader1.AutoUseSystemTempFolder = True

    End If
     
    my web config is:
    <add key="FileUploadTempPath" value="c:\\temp\\"/>
     
     
    Not sure what I'm doing wrong?
     
    Thanks

    Ian Pettman
    Ava producers of leading Temp Agency Software
    Filed under:
  •  06-01-2009, 1:33 PM 52709 in reply to 52694

    Re: temp file path

    It works for me.
     
    I am using the following code:
     
    1. <%@ Page Language="VB" %>   
    2. <script runat="server">   
    3.     Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)   
    4.         MyBase.OnInit(e)   
    5.         AddHandler Uploader1.FileUploaded, AddressOf Uploader_FileUploaded   
    6.         Dim sUploadTempPath As String = System.Configuration.ConfigurationManager.AppSettings("FileUploadTempPath")   
    7.         If sUploadTempPath <> "" Then   
    8.             Uploader1.TempDirectory = sUploadTempPath   
    9.             Uploader1.AutoUseSystemTempFolder = False   
    10.         Else   
    11.             Uploader1.AutoUseSystemTempFolder = True   
    12.         End If   
    13.     End Sub   
    14.   
    15.     Private Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)   
    16.         Dim uploader As Uploader = DirectCast(sender, Uploader)   
    17.         'Copys the uploaded file to a new location.    
    18.         'args.CopyTo("c:\\temp\\"& args.FileName)   
    19.     End Sub   
    20. </script>   
    21. <html xmlns="http://www.w3.org/1999/xhtml" >   
    22. <body>   
    23.     <form id="form1" runat="server">      
    24.     <CuteWebUI:Uploader runat="server" ID="Uploader1" MultipleFilesUpload="true"></CuteWebUI:Uploader>   
    25.      </form>   
    26. </body>   
    27. </html>  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML