-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload.asp
52 lines (46 loc) · 1.08 KB
/
upload.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!--#include file="uploadclass.asp"-->
<%
Response.Buffer = False
Server.ScriptTimeOut = 300
Dim oPseudoRequest, isSaved, action
Set oPseudoRequest = new PseudoRequestDictionary
oPseudoRequest.ReadRequest()
oPseudoRequest.ReadQuerystring(Request.Querystring)
action = oPseudoRequest.Item("action")
If oPseudoRequest.Item("file_1").ContainsFile Then
%>
<table border=0>
<tr>
<td>file</td>
<td><%=oPseudoRequest.Item("file_1")%></td>
</tr>
<tr>
<td>name</td>
<td><%=oPseudoRequest.Item("file_1").FileName%></td>
</tr>
<tr>
<td>size</td>
<td><%=oPseudoRequest.Item("file_1").FileSize%> bytes</TD>
</TR>
<tr>
<td>type</td>
<td><%=oPseudoRequest.Item("file_1").ContentType%></td>
</tr>
</table>
<%
path="c:\inetpub\site\upload\"
isSaved = SaveFileAs(oPseudoRequest, "file_1", path, "")
If isSaved Then
If action = "test" Then
response.write "opgeslagen"
Else
response.redirect "/"
End If
Else
Response.write "Error saving file."
End If
Else
Response.write "Please choose a file."
End If
Set oPseudoRequest = Nothing
%>