Checking file type of uploaded file using asp

parindar

New Member
I am uploading images to the server using aspsimpleupload.
Can I find the files types & file size of the files before copying the files to the required folder???

Can anyone please help me ??? It is urgent.

Thanks.

I am using the following script to upload:

Dim upl, NewFileName , name

Set upl = Server.CreateObject("ASPSimpleUpload.Upload")

If Len(upl.Form("File1")) > 0 Then
name =upl.ExtractFileName(upl.Form("File1"))
NewFileName = "/login/Uploads/" & name

If upl.SaveToWeb("File1", NewFileName) Then
Response.Write("File successfully written to disk.")
Else
Response.Write("There was an error saving the file to disk.")
End If
End If
%>

<html><head><title>Uploads your photos</title></head>
<BODY>
<p>&nbsp;</p>
<p>&nbsp;</p>
<center><form method="POST" action="default.Asp" enctype="multipart/form-data">
<b> Select a file to upload: </b><input type="file" name="File1" size="30">
<input type="submit" name="submit" value="Upload Now">
</form>
</center>
</body>
</html>
 
Top