[thelist] ASP file upload problems
Amy Johnson
ajohnson at purplemountain.net
Fri Apr 19 13:08:01 CDT 2002
Hi. I am trying to set up a web site where the client can log in and upload web images to the server. I am using the
ASPSimpleUpload component. My problem is security. First we tried putting the writeable directory in an area outside the web
space. This worked great for uploading and deleting the files. BUT the web page could not access the images. The system admin
(NT) says that he can't make the directory universally readable or it would also be writeable through the web.
So now we're trying putting the directory in the web space but password protected. This causes the upload component to fail with
the following message.
*************************************************
Error:
There was an error writing the uploaded file to the disk. Please check the permissions on the SERVER and make sure the directory has
write permission for the group "Everyone"
*************************************************
I was hoping a window would popup asking me for the password - no such luck. How can I incorporate the username and password into
the ASP code? Or is there another solutions? The code follows. Thanks for any help!!!!!!
Amy
==============================================
Set upl = Server.CreateObject("ASPSimpleUpload.Upload")
fname = upl.ExtractFileName(upl.Form("file1"))
If Len(upl.Form("file1")) > 0 Then
SaveFileName = relimglocation & upl.ExtractFileName(upl.Form("file1"))
' SaveFile takes two paramaters
' Param1 = Field name from the form
' Param2 = Location and filename to save the file to
If upl.SaveToWeb("file1", SaveFileName) Then
Response.Write fname & " was successfully uploaded to server." %><br><%
Else
Response.Write("There was an error uploading the file to server.")
End If
End If
=====================================================
More information about the thelist
mailing list