asp Dundas

Use Dundas with asp 3.0 for upload feature everything is working fine.
except  I want to save the file name with "{" and "}"
now the dll automatically create string after upload process is completed{FD4A73FF-1D79-413B-A56B-CC27BFBA724C}_err.pdf
I just want the url with any { and }

any one know how to do it?

Function UploadProcessing_OpenBond(MaxUpload_Size,created_by,created_date)
'most control methods throw an exception if an error occurs so we will use an
' On Error Resume Next statement for error trapping purposes
On Error Resume Next
'create an instance of the Upload control
Set  objUpload = Server.CreateObject ("Dundas.Upload.2")
	 objUpload.MaxUploadSize = MaxUpload_Size
	 objUpload.UseUniqueNames = True
	 objUpload.UseVirtualDir = False
    if trim(Request.ServerVariables("server_name")) = "suretyappdev" then
		 objUpload.Save "E:\Websites\Dev\"
	   	 txtquoteid		  =trim(objUpload.form("txtquoteid"))
 	  	 txtagencyid		  =trim(objUpload.form("txtagencyid"))
     'document_description =trim(objUpload.form("txtdocumentdescription"))
     if objUpload.Files.Count > 0 then
		' retrieve original filename
		origName 			= trim(objUpload.GetFileName(objUpload.Files(0).OriginalPath))
		' retrieve filename as saved on the server
		origNamewithserver 	= Replace(Replace(trim(objUpload.GetFileName(objUpload.Files(0).Path)),"{",""),"}","")
		' retrieve file's extension, this will always be the same
		sExt 				= trim(objUpload.GetFileExt(objUpload.Files(0).OriginalPath))
		'size of the file
		fileSize 			= trim(objUpload.Files(0).Size)
	 end if
'check to see if method call was successful using VBScript's Err object, if 
' an error occurred we will redirect user to a fictitious error page
If Err.Number <> 0 Then
 	p=p &  Err.Description
elseif fileSize > 2097152 then
	p=p & "Your file is too big, we allows to upload up to 1 file to the server, with a maximum file size of one (2) MBytes per file only."
elseif sExt = "exe" or sExt = "EXE" then
    p=p & "Executable file is not allowed to upload."
	'use a For Each loop and check to see if the uploaded file is an
	' executable (utilizing VBScript's InStr method), if it is delete it from disk.
	'but first we will output the name of the file input box(es) responsible for uploads
	For Each objUploadedFile in objUpload.Files
	    'Response.Write "The &quot;" & objUploadedFile.TagName & "&quot; file input box was used to upload a file.<br>"
		If InStr(1,objUploadedFile.ContentType,"octet-stream") Then
			'if the default web account does not have the right to delete files
			' for the folder you save uploaded files to (in this case c:\temp) then you can either set
			' the required rights manually or you could use the ImpersonateUser method
		End If
	webattachmentassignedIP="https://" & domainname & "/eServices/"
    Attachment_url		   =webattachmentassignedIP & origNamewithserver
End If
'Release resources
Set objUpload = Nothing
End Function

Open in new window

Who is Participating?
Ivo StoykovConnect With a Mentor Commented:
no experience with Dundas, but in general your code runs after the server has received and save the file, so if Dundas support does not answer, you have two approaches:
  1. remove {} and inside string.
  2. get filename from your form and pass it to replace generated name.
but the best will be support answer
All Courses

From novice to tech pro — start learning today.