.resx help please (ASP uploader)

Last post 01-28-2011, 7:58 AM by Eric. 1 replies.
Sort Posts: Previous Next
  •  01-27-2011, 4:24 PM 65924

    .resx help please (ASP uploader)

    We are trying to use ASPUploader from the examples provided in the download. We have it working...but the files get uploaded as .resx files. How do we get them uploaded as regular files (.jpg, etc...) We need to display them on the page and actually keep them on the server. The only way we could get this to work at all was to use this code. Any help at all would be really appreciated.
     
    <form id="form1" method="POST"> 

     <%       
                Dim uploader
                Set uploader=new AspUploader
                uploader.MaxSizeKB=10240
                uploader.Name="myuploader"
                uploader.InsertText="Upload File (Max 10M)"
                uploader.AllowedFileExtensions="*.jpg,*.png,*.gif"
                uploader.MultipleFilesUpload=true
                Uploader.TempDirectory ="E:\Webs\ourwesbite.com\http-docs\uploads\"
    %>
                <%=uploader.GetString() %>
                </form>
  •  01-28-2011, 7:58 AM 65934 in reply to 65924

    Re: .resx help please (ASP uploader)

    Dear IPixel,
     
    Please refer to the following highlighted code, it will save uploaded files as your original file name.
     
    Solution 1:
     <% @ Language="VBScript" %>  
    <!-- #include file="aspuploader/include_aspuploader.asp" -->  
    <html>   
    <body>   
            <form id="form1" method="POST">   
                <%
                    Dim uploader   
                    Set uploader=new AspUploader   
                    uploader.Name="myuploader"
                    uploader.SaveDirectory="/myfolder"
                    uploader.Render()  
                %>
            </form>   
    </body>   
    </html>
    Solution 2:
    <%@ Language="VBScript" %>   
    <!-- #include file="aspuploader/include_aspuploader.asp" -->  
    <html>   
    <head>   
    </head>   
    <body>   
            <form id="form1" method="POST">   
            <%   
                Dim uploader   
                Set uploader=new AspUploader   
                uploader.Name="myuploader"  
                uploader.Render()   
            %>   
            </form>   
                   
    <%   
      
    If Request.Form("myuploader")&""<>"" Then  
        Dim mvcfile   
        Set mvcfile=uploader.GetUploadedFile(Request.Form("myuploader"))    
        targetfilepath= "savefiles/myprefix_" & mvcfile.FileName   
        mvcfile.MoveTo( server.mappath(targetfilepath))       
        Response.Write("<div style='font-family:Fixedsys'>")   
        Response.Write("Uploaded File")   
        Response.Write("<br/><br/>FileName: ")   
        Response.Write(mvcfile.FileName)   
        Response.Write("<br/>FileSize: ")   
        Response.Write(mvcfile.FileSize)   
    '   Response.Write("<br/>FilePath: ")   
    '   Response.Write(mvcfile.FilePath)   
        Response.Write("</div>")   
    End If  
      
    %>   
                               
    </body>   
    </html> 
    Thank you for asking
View as RSS news feed in XML