Forums
This topic is locked
upload problem...argh....
Posted 09 Jan 2006 00:14:33
1
has voted
09 Jan 2006 00:14:33 long fringe posted:
purchased a package to admin an online photo gallery that uses a file called incPureUpload.asp. I am getting an error message when trying to upload images to the site. I can successfully enter categories for the gallery structure on an MS Access database, but the prob is when uploading images. When I hit the submit button on the submit.asp page, I get this error.An error has occurred while saving uploaded file!
Filename: d:\hosting\username\gallery\admin\..\images\go3.gif
How can I change the default images folder? I believ it should not be trying to place images in the admin directory, but rather one directory up, in the 'gallery\images' directory.
========================
The UploadDirectory lines in the incPureUpload.asp page that I think are relevant are:
Line 124: Sub BuildUploadRequest(RequestBin,UploadDirectory,storeType,sizeLimit,nameConflict)
pau_BuildUploadRequest RequestBin,UploadDirectory,storeType,sizeLimit,nameConflict,""
End Sub
Line 129: Subpau_BuildUploadRequest(RequestBin,UploadDirectory,storeType,sizeLimit,nameConflict,Extensions)
Line 224: Dim orgUploadDirectory
if InStr(UploadDirectory,""""

on error resume next
orgUploadDirectory = UploadDirectory
UploadDirectory = eval(UploadDirectory)
if err then
Response.Write "<b>Upload folder is invalid</b><br/><br/>"
Response.Write "Upload Folder: " & Trim(orgUploadDirectory) & "<br/>"
Response.Write "Please correct and <a href=""javascript:history.back(1)"">try again</a>"
err.clear
response.End
end if
on error goto 0
end if
GP_keys = UploadRequest.Keys
for GP_i = 0 to UploadRequest.Count - 1
GP_curKey = GP_keys(GP_i)
'Save all uploaded files
if UploadRequest.Item(GP_curKey).Item("FileName"

GP_value = UploadRequest.Item(GP_curKey).Item("Value"

GP_valueBeg = UploadRequest.Item(GP_curKey).Item("ValueBeg"

GP_valueLen = UploadRequest.Item(GP_curKey).Item("ValueLen"

'Get the path
if InStr(UploadDirectory,"\"

GP_curPath = UploadDirectory
if Mid(GP_curPath,Len(GP_curPath),1) <> "\" then
GP_curPath = GP_curPath & "\"
end if
GP_FullPath = GP_curPath
else
if Left(UploadDirectory,1) = "/" then
GP_curPath = UploadDirectory
else
GP_curPath = Request.ServerVariables("PATH_INFO"

Line 258: GP_curPath = Trim(Mid(GP_curPath,1,InStrRev(GP_curPath,"/"

=====================end
I do have the permissions set with read/write permissions. Argh!! Thanks!!!