1,105,371 Community Members

error uploading a file

Member Avatar
RCDAWebmaster
Newbie Poster
2 posts since Jul 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi everyone, I’m getting the following error uploading a file with asp. I’m using the code I downloaded from uploadasp.zip. I don’t know who wrote it so I can’t give credit.
I've checked my local dev box here and I do infact have the correct directory permissions as far as I can tell.

Mike

Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument
/administration/DBupload/upload.asp, line 136

The code:

Public Sub SaveToDisk(sPath)
		Dim oFS, oFile
		Dim nIndex
	
		If sPath = "" Or FileName = "" Then Exit Sub
		If Mid(sPath, Len(sPath)) <> "\" Then sPath = sPath & "\"
	
		Set oFS = Server.CreateObject("Scripting.FileSystemObject")
		If Not oFS.FolderExists(sPath) Then Exit Sub
		
		Set oFile = oFS.CreateTextFile(sPath & FileName, True)
		
		For nIndex = 1 to LenB(FileData)
		    oFile.Write Chr(AscB(MidB(FileData,nIndex,1)))	<-- Line 136
		Next

		oFile.Close
	End Sub
Member Avatar
ArtistScope
Junior Poster
146 posts since Jun 2010
Reputation Points: -5 [?]
Q&As Helped to Solve: 15 [?]
Skill Endorsements: 0 [?]
 
0
 

Most likely a problem with the file path... or the routine itself will never work. While a lot people use DLLs to process ASP uploads, it can be done using pure ASP, but the routines are much more complex than what your script suggests.

Member Avatar
RCDAWebmaster
Newbie Poster
2 posts since Jul 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

problem fixed by replacing the script with one that actually works.

Question Answered as of 2 Years Ago by ArtistScope
kaybell
Newbie Poster
1 post since Jan 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
Unverified Member
 
0
 

I was wondering what script you found? I'm using this uploader that doesn't work either and I need one that does.

Thanks in advance.

Member Avatar
remunance
Newbie Poster
12 posts since Jan 2013
Reputation Points: -3 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

It not uderstand code.

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: