Gopinath
09-16-2003, 04:02 AM
I have problem in file uploading. I attached my code. Pls go through it, and find the problem and give me a solution
But it shows, file is uploaded. When check the file in Windows Explorer, it does not exist. Pls give me a solution
<%
dim oUpload
Set oUpload = Server.CreateObject("ASPPW.Upload")
oUpload.RejectEmptyExtension = True 'True/False
oUpload.FileExtensionList "txt", "gif" ,"jpg", "*" 'remove '*', if you don't allow all types
oUpload.RegistrationCode = 670920731013 'String expression
oUpload.RemoveUploadedFilesOnError = True 'True/Falses
Set oForm = oUpload.Form
'Save uploaded file here.
oUpload.UpLoadPath = Server.mappath(".")&"\LessonContent" '/inetpub/wwwroot/upload
file_doc = split(time(),":")
file_doc1 = split(file_doc(2)," ")
file_date=split(date(),"/")
profix=file_date(0)&file_date(1)&file_date(2)&file_doc(0)&file_doc(1)&file_doc1(0)&"_"
oupload.SaveFileWithPrefix= profix
i = oUpload.Upload
if i=1 then
Response.Write("Uploaded")
else
Response.Write ("Problem")
end if
%>
Thankz in advance
-Gopi:confused:
But it shows, file is uploaded. When check the file in Windows Explorer, it does not exist. Pls give me a solution
<%
dim oUpload
Set oUpload = Server.CreateObject("ASPPW.Upload")
oUpload.RejectEmptyExtension = True 'True/False
oUpload.FileExtensionList "txt", "gif" ,"jpg", "*" 'remove '*', if you don't allow all types
oUpload.RegistrationCode = 670920731013 'String expression
oUpload.RemoveUploadedFilesOnError = True 'True/Falses
Set oForm = oUpload.Form
'Save uploaded file here.
oUpload.UpLoadPath = Server.mappath(".")&"\LessonContent" '/inetpub/wwwroot/upload
file_doc = split(time(),":")
file_doc1 = split(file_doc(2)," ")
file_date=split(date(),"/")
profix=file_date(0)&file_date(1)&file_date(2)&file_doc(0)&file_doc(1)&file_doc1(0)&"_"
oupload.SaveFileWithPrefix= profix
i = oUpload.Upload
if i=1 then
Response.Write("Uploaded")
else
Response.Write ("Problem")
end if
%>
Thankz in advance
-Gopi:confused: