Reply to topic
Uploading a file from an online form?
PRMac


Joined: 04 May 2004
Posts: 11
Reply with quote
Can anyone tell me how to allow file uploads in an online form? Specifically, I want potential employees to be able to upload their resumes (usually Word documents).

Thanks!
MBMunday


Joined: 06 Apr 2004
Posts: 76
Location: Dallas/Fort Worth
Reply with quote
Are you doing it in classic ASP or .NET?

MB
PRMac


Joined: 04 May 2004
Posts: 11
Reply with quote
I am hosting with hostmysite, and their "features" page shows they have ASP.NET with ASPUpload installed. I'm guessing it's fairly easy, but I'm an ASP newbie. Confused
ASPupload Walkthrough
jamie
HostMySite Sales Rep
HostMySite Sales Rep

Joined: 19 Mar 2004
Posts: 858
Location: Newark, De
Reply with quote
Here's a link that will help explain things about ASPupload:

http://www.hostmysite.com/support/programming/aspupload/

Test it out and let us know if you have any problems!


Last edited by jamie on Fri May 07, 2004 11:28 am; edited 1 time in total
PRMac


Joined: 04 May 2004
Posts: 11
Reply with quote
Perfect! Thank you. Cool
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1047
Location: Felton, Delaware
Reply with quote
On the other hand, if you would like to upload via ASP.NET, it's very simple and I use it all the time. Try this on for size Wink

Code:

Sub Upload_Click(ByVal Source As Object, ByVal e As EventArgs)
    If Not (uploadedFile.PostedFile Is Nothing) Then
        Try
            Dim savePath As String = Server.MapPath("/Remote_Path/")
            Dim postedFile = uploadedFile.PostedFile
            Dim filename As String = Path.GetFileName(postedFile.FileName)
            Dim ext as string = filename.Substring(filename.LastIndexOf("."))
            If ext=".doc" Then
                postedFile.SaveAs(savepath & filename)
                message.Text = filename & " - UPLOADED SUCCESSFULLY!"
            Else
                message.Text = "Please only upload .doc files!"
            End If
        Catch exc As Exception
            message.Text = "< kicks the server >"
        End Try
    End If
End Sub

<form enctype="multipart/form-data" runat="server">
  <font size="4"><b>Upload Utility...</b></font><br>
  <hr>
  <br>
  <input id="uploadedFile" type="file" runat="server" accept="image/jpeg" size="40">
  <input type="button" id="upload" value="Upload" OnServerClick="Upload_Click" runat="server" accept="image/jpeg">
  <p><asp:Label id="message" runat="server"/></p>
</form>
Geof


Joined: 06 Apr 2005
Posts: 4
Reply with quote
Thanks for this. The only change I made to get this working (beginner that I am) is this:
Code:
Dim filename As String = System.IO.Path.GetFileName(postedFile.FileName)
gerry


Joined: 23 May 2009
Posts: 1
Reply with quote
Hi everyone

Can anyone help

I am with 1and1.co.uk and I am trying to upload an online form which I created in Dreamweaver. I am not a programmer and have learned Dramweaver myself. 1and1 do not seem to know how I do it. Can anyone help

cheers

Gerry
jamie
HostMySite Sales Rep
HostMySite Sales Rep

Joined: 19 Mar 2004
Posts: 858
Location: Newark, De
Reply with quote
Unfortunately there is precious little that can be done if you're at a different host - you have to rely upon their support for some things.

Which is why I stongly suggest using a host with excellent support... Wink
Uploading a file from an online form?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic