• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

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?
0
MitchellVII
Asked:
MitchellVII
2 Solutions
 
Chandan_GowdaCommented:
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now