I want to upload Word .docs to folder in my web server directory...

Hi,

I have candidate's sending me resumes.  I want them to be able to click a button, open their personal file explorer, chose their resume, then click another button and have it uploaded to my web server directory.

Any good asp scripts for that?
LVL 5
MitchellVIIAsked:
Who is Participating?
 
Chandan_GowdaConnect With a Mentor Commented:
Try this....

www.freeaspupload.net
0
 
MitchellVIIAuthor Commented:
Ok, finally figured it all out.  Here is the entire code to:

1. Upload Resume to Server.
2. Email Resume as Attachment to me.
3. Delete Resume off Server.

<%
'Upload Resume to Server:
Set Upload = Server.CreateObject("Persits.Upload")
Count = Upload.Save(Server.MapPath("\resumes"))

'Create Email to Send File to Me as Attachment:
Set myMail=CreateObject("CDO.Message")

myMail.Subject="New resume!"
myMail.From="resume@test.com"
myMail.To="resume@mydomain.com"
myMail.TextBody="Here's a new resume!"

For Each File in Upload.Files
    myMail.AddAttachment Server.MapPath("\resumes\" & File.ExtractFileName)
Next

'Set up Connections:
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="mail.mydomain.com"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Fields.Update

'Send Email:
myMail.Send

'Delete Resume off Server:
Dim objfso
Set objfso = Server.CreateObject("Scripting.FileSystemObject")

For Each File in Upload.Files
    objfso.DeleteFile(Server.MapPath("\resumes\" & File.ExtractFileName))
Next

Set objfso = Nothing
Set myMail=nothing
Set Upload = nothing
%>

<form> tag looks like this:

<form method="post" action="myUploadScript" enctype="multipart/form-data">

Works like a charm, thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.