aspSmartUpload virker ikke
Jeg har brugt denne kode i lang tid, men nu virker den pludselig ikke ?!?!Jeg får fejlen:
aspSmartUpload error '800a0034'
Bad file name or number
/admin/varer/Opret_Vare_Process.asp, line 107
Og koden ser sådan ud:
intMaxFileSize = 2000
strBilledMappe = "../../varer_pic"
'Make sure we are using a virtual directory for script
mySmartUpload.DenyPhysicalPath = True
'Save the file first to memory
'mySmartUpload.Upload
'Get the file name, the path mehod will be empty as we are saving to memory so use the original file path of the users system to get the name
strNewFileName = mySmartUpload.Files(1).Filename
'Replace spaces with underscores
strNewFileName = Replace(strNewFileName, " ", "_", 1, -1, 1)
strNewFileName = Replace(strNewFileName,"æ", "ae")
strNewFileName = Replace(strNewFileName,"Æ", "AE")
strNewFileName = Replace(strNewFileName,"ø", "oe")
strNewFileName = Replace(strNewFileName,"Ø", "OE")
strNewFileName = Replace(strNewFileName,"å", "aa")
strNewFileName = Replace(strNewFileName,"Å", "AA")
'Create a new file name for file as using a random genrated hex code, and hope it doesn't already exist as there is noway with this component of finding if the file already exists
rFilNavn = now()
rFilNavn = Replace(rFilNavn,":", "")
rFilNavn = Replace(rFilNavn,"\", "")
rFilNavn = Replace(rFilNavn,"/", "")
rFilNavn = Replace(rFilNavn,"-", "")
rFilNavn = Replace(rFilNavn," ", "")
strNewFileName = rFilNavn & "_" & strNewFileName
Response.Write strBilledMappe & "/" & strNewFileName
'Response.End
'Save the file to disk
mySmartUpload.Files(1).SaveAs strBilledMappe & "/" & strNewFileName '<------ Line 107 <-------------------
strFilNavn = strNewFileName
