S
srini
Hi experts,
I have the below scenario:
1. I have a html form that has a field for attachment. Once the user
clicks on the Browse button, the file is attached from his local PC.
2.Then, I have an asp script that triggers on Submit action in the
html form. Both html and ASP pages are hosted on a web server, which
is in the same domain as the user's PC.
3. I have the below lines of code in the ASP file.
' code start---------------------
dim attachedFile
attachedFile = Request.Form("attachedfile")
Dim fso, finalAttachment
Set fso = CreateObject("Scripting.FileSystemObject")
Set finalAttachment = fso.GetFile(attachedFile)
' code over----------------------
4. Now I get the below error:
-------------
Error Type:
Microsoft VBScript runtime (0x800A0035)
File not found
/ptg/submitForm.asp, line 50
--------------------
Here I understand that when I attach a file from a user machine, the
web server expects it to be on its local file system.
How can I make sure that the ASP script takes a file from the local PC
and makes the script think that it is on its (web server) local file
system?
Can any one help me out here?
Thanks,
Srini
I have the below scenario:
1. I have a html form that has a field for attachment. Once the user
clicks on the Browse button, the file is attached from his local PC.
2.Then, I have an asp script that triggers on Submit action in the
html form. Both html and ASP pages are hosted on a web server, which
is in the same domain as the user's PC.
3. I have the below lines of code in the ASP file.
' code start---------------------
dim attachedFile
attachedFile = Request.Form("attachedfile")
Dim fso, finalAttachment
Set fso = CreateObject("Scripting.FileSystemObject")
Set finalAttachment = fso.GetFile(attachedFile)
' code over----------------------
4. Now I get the below error:
-------------
Error Type:
Microsoft VBScript runtime (0x800A0035)
File not found
/ptg/submitForm.asp, line 50
--------------------
Here I understand that when I attach a file from a user machine, the
web server expects it to be on its local file system.
How can I make sure that the ASP script takes a file from the local PC
and makes the script think that it is on its (web server) local file
system?
Can any one help me out here?
Thanks,
Srini