Hi, I wonder if anyone could tell me if there is a default upload folder for image uploads in this code or if the code references another file. It works fine but I am trying to change the upload folder for images and cannot find where its done.
This bit confuses me as the application gcp, I simply dont know where it is. The only include in this page is just an upload include that has no other includes in it.
If anyone can explain the application bit that would be great.
Thanks
Richard
strFileUploadPath=Application("gcp_PathImageUpload s")
- <%
-
-
<!--#Include File="upload2.asp"-->
-
-
' Create the FileUploader
-
Dim Uploader, File
-
Set Uploader = New FileUploader
-
-
'On Error Resume Next
-
-
' This starts the upload process
-
Uploader.Upload()
-
-
' Check if any files were uploaded
-
If Uploader.Files.Count = 0 Then
-
Response.Write "No file(s) have been uploaded."
-
Else
-
-
' Loop through the uploaded files
-
For Each File In Uploader.Files.Items
-
-
' Save the file
-
strFileUploadPath=Application("gcp_PathImageUploads")
-
-
'check if file exists
-
strFileNameTemp=""
-
set fs=Server.CreateObject("Scripting.FileSystemObject")
-
If fs.FileExists(Application("gcp_PathImageUploads") & File.FileName)=True Then
-
Dim MyNewRandomNum
-
Randomize
-
MyNewRandomNum = int(Rnd * 198300)+1
-
strFileNameTemp=MyNewRandomNum & File.FileName
-
File.FileNameNew strFileNameTemp
-
Else
-
strFileNameTemp=File.FileName
-
End If
-
-
-
File.SaveToDisk strFileUploadPath
-
FileContentType1=File.ContentType
-
FileSize1=File.FileSize
-
If Trim(FileName1)<>"" Then
-
FileName1=FileName1 & ","
-
End If
-
FileName1 =FileName1 & File.FileName
-
strFileName=Application("gcp_URLImageUploads") & FileName1
-
-
Next
-
End If
-
-
If Err.Number>0 Then
-
Response.Write "Error Number: " & Err.Number
-
Response.Write "<br>Description " & Err.Description
-
Response.write "<br>There is no specified upload folder."
-
End If
-
-
If Err.Number>0 Then
-
strMessage="There is no specified upload folder."
-
Response.End
-
End If
-
-
-
%>