Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

How to edit my File Uploading Codes to support Chrome?

$
0
0

//

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="asp_upload3.aspx.vb" Inherits="Upload" %>

<!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></title>
</head>
<body>
 
<form action="asp_upload4.asp" method="post" enctype="multipart/form-data" name="frmMain">  
Upload 1  
<input name="file1" type="file"><br>  
Upload 2  
<input name="file2" type="file">  
<input type="submit" name="Submit" value="Submit">  
</form>  

</body>
</html>

//

<% Option  Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
    Dim mySmartUpload

    '*** Create Object ***'    
    Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

    '*** Upload Files ***'
    mySmartUpload.Upload

    
    '*** Upload file1 ***'
    If mySmartUpload.Files("file1").FileName <> "" Then
        mySmartUpload.Files("file1").SaveAs(Server.MapPath("/ptm/pm21/photo/AA9999/" & mySmartUpload.Files("file1").FileName))
        Response.write mySmartUpload.Files("file1").Name & " Uploaded."
    End If
    
    '*** Upload file2 ***'
    If mySmartUpload.Files("file2").FileName <> "" Then
        mySmartUpload.Files("file2").SaveAs(Server.MapPath("/ptm/pm21/photo/AA9999/" & mySmartUpload.Files("file2").FileName))
        Response.write mySmartUpload.Files("file2").Name & " Uploaded."
    End IF

    '*** Properties ***'
    'Response.Write("Name = " & mySmartUpload.Files("file1").Name & "<BR>")
    'Response.Write("Size = " & mySmartUpload.Files("file1").Size & "<BR>")
    'Response.Write("FileName = " & mySmartUpload.Files("file1").FileName & "<BR>")
    'Response.Write("FileExt = " & mySmartUpload.Files("file1").FileExt & "<BR>")
    'Response.Write("FilePathName = " & mySmartUpload.Files("file1").FilePathName & "<BR>")
    'Response.Write("ContentType = " & mySmartUpload.Files("file1").ContentType & "<BR>")
    'Response.Write("ContentDisp = " & mySmartUpload.Files("file1").ContentDisp & "<BR>")
    'Response.Write("TypeMIME = " & mySmartUpload.Files("file1").TypeMIME & "<BR>")
    'Response.Write("SubTypeMIME = " & mySmartUpload.Files("file1").SubTypeMIME & "<BR>")

    Set mySmartUpload = Nothing
%>
</body>
</html>
<!--- This file download from www.shotdev.com -->


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>