Jump to content

problem attaching user file on web form using CDO


Guest jennyr
 Share

Recommended Posts

I've used CDOSYS successfully to email user input from web forms, now I want to be able to let the users attach a file.I'm trying to code .AddAttachment but obviously can't hard code the pathname as each users file will be different. I've managed to gather the file name using an input field type="file" but that doesn't give the full pathname and so CDO gives an error message to say file not found. My scripts sit on a remote server.Any ideas please??Jennyr

Link to comment
Share on other sites

You will need to use something to accept the file upload. If you are using classic ASP, you will need to use a third-party component, since that is not built-in to classic ASP. If you don't have control of the server, you will need to find out from whoever runs the server to figure out what to use to handle a file upload.Once the file is uploaded, you will have access to the temporary filename, which is a random filename where the server saved the file they uploaded, and you will also have access to the original filename on the user's computer, so you can rename the temporary filename to match the original name.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...