For anyone that is having problems with having no COM control installed
on the server for uploads you can use the following code to
functions_upload.asp
<!--#include virtual="/includes/upload.asp"--> |
at the top of the page.
line 397 add another case for no component...
Case "nocom"
Dim Uploader
Set Uploader = New FileUploader
' This starts the upload process
Uploader.Upload()
'******************************************
' Use [FileUploader object].Form to access
'******************************************
' Check if any files were uploaded
If Uploader.Files.Count = 0 Then
Response.Write "File(s) not uploaded."
Else
' Loop through the uploaded files
For Each File In Uploader.Files.Items
' Check where the user wants to save the file
' Save the file
File.SaveToDisk(Server.MapPath(strFileUploadPath))
' Output the file details to the browser if you want
'Response.Write "File Uploaded: " & File.FileName & "<br>"
'Response.Write "Size: " & File.FileSize & " bytes<br>"
'Response.Write "Type: " & File.ContentType & "<br><br>"
Next
End If
|
You can grab the class at http://www.asp101.com/articles/jacob/scriptupload.asp