Creating an upload and a receive page

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Creating an upload and a receive page

    I would like to create an Dreamweaver upload page for my website to allow users
    to upload files. It doesn't have to be a complex one; I just need the page to
    have one upload field with a browse option and a field for the name, email,
    etc. After the user uploads the file and click send, I would like the file to
    either go to a receive page, or to a database; I am currently using Access.

    I know Dreamweaver allows you to create an upload page, but the problem is
    that I don't know how to do the rest such as making the whole thing work. I
    have found dozens of sites that provide codes to create an upload page and
    receive page, unfortunately, they don't explain it in layman's terms. I would
    appreciate it if someone has a step by step way to create this; including how
    to configure my database to receive the uploaded file.

    Thanks


    nordine5 Guest

  2. Similar Questions and Discussions

    1. Upload page
      Hi, I need to create a very simple upload page, that allows a user to upload an image, title, summary, and body text. The main problem I'm having...
    2. creating upload image page using cfm
      Hi...i tried to build an application where someone can upload an image and can be store in access database where other user can view each see the...
    3. Just need to upload files not to edit a page
      You could try using an FTP program. That's what it's designed for. Christine
    4. Freezes when creating new page from existing page
      I am using Contribute 3 on a Mac w/OS X. Whenever I try to create a new page as a copy of an existing page, the software freezes (spins endlessly)....
    5. Form submit -> receive resulting stream in same page
      I am trying to connect an e-commerce system to a payment gateway (located in Hong Kong). The gateway takes values in the form of a simple form...
  3. #2

    Default Re: Creating an upload and a receive page

    with DW you create the form for the user to select the files. for
    uploading them to the server, you'll need some additional stuff that
    will depend on the server model you choose (ASP, PHP, JSP, ...) and your
    DB. so, explain it and surely somebody will help you

    BTW, if your files are binary ones like images, i'd stored them in a
    folder and put just the names in the DB

    HTH,

    Manuel

    nordine5 wrote:
    > I would like to create an Dreamweaver upload page for my website to allow users
    > to upload files. It doesn't have to be a complex one; I just need the page to
    > have one upload field with a browse option and a field for the name, email,
    > etc. After the user uploads the file and click send, I would like the file to
    > either go to a receive page, or to a database; I am currently using Access.
    >
    > I know Dreamweaver allows you to create an upload page, but the problem is
    > that I don't know how to do the rest such as making the whole thing work. I
    > have found dozens of sites that provide codes to create an upload page and
    > receive page, unfortunately, they don't explain it in layman's terms. I would
    > appreciate it if someone has a step by step way to create this; including how
    > to configure my database to receive the uploaded file.
    >
    > Thanks
    >
    >
    Manuel Socarras Guest

  4. #3

    Default Re: Creating an upload and a receive page

    Here is what I have done so far:

    I have created two asp files; one called upload.asp, the other
    upload_handling.asp. The upload page is simple and only has the name field and
    upload field along with a browse and upload button; In the upload_handling page
    I copied the code from the following pure ASP page
    [url]http://www.asp101.com/articles/jacob/scriptupload.asp;[/url]
    however, I am not sure if I did it correctly.
    Do I need to create a table in my database to receive the files uploaded? do I
    need to create a recordset? Do I need to put any fields in the upload_handling
    page? right now the upload_handling page seems empty except for the code.

    PS: Note that I have not done any changes to the code from the ASP page.

    So many questions.

    I am including the code for each of the pages I created maybe spmeone can take
    a look at them and tell me what areas need to be changed or if new things need
    to be added. I am particularly confused about those part of the code I need to
    change to fit my own connection.

    Here is the code for the upload.asp page:

    Begin code
    ================================================== ======
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>

    <body>
    <form name="form1" id="form1" enctype="multipart/form-data" method="post"
    action="">
    <p>Enter your name and select a file to upload.</p>
    <p>
    <input type="text" name="textfield" />
    </p>

    <p>
    <input type="file" name="file" />
    </p>
    <p>
    <input type="submit" name="Submit" value="Upload" />
    </p>
    </form>
    </body>
    ================================================== =======
    End code for upload.asp

    Here is the code for the upload_handling.asp page:

    Begin code
    ================================================== =======
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>

    <body>
    <%
    Dim MyUploader
    Set MyUploader = New FileUploader
    %>
    <%
    MyUploader.Upload()
    %>
    <%
    Dim File
    For Each File In MyUploader.Files.Items
    Response.Write "File Name:" & File.FileName
    Response.Write "File Size:" & File.FileSize
    Response.Write "File Type:" & File.ContentType
    Next
    %>
    <%
    Dim RS
    Dim File

    Set RS = Server.CreateObject("ADODB.Recordset")
    RS.Open "MyUploadTable", "CONNECT STRING OR ADO.Connection", 2, 2

    For Each File In MyUploader.Files.Items
    RS.AddNew

    RS("filename") = File.FileName
    RS("filesize") = File.FileSize
    RS("contenttype") = File.ContentType

    File.SaveToDatabase RS("filedata")

    RS.Update
    Next

    RS.Close
    %>

    </body>
    </html>
    ================================================== ========
    End code for upload_handling.asp


    Thanks for all the help provided

    Nordine


    nordine5 Guest

  5. #4

    Default Re: Creating an upload and a receive page

    the pure website is as this one:

    [url]http://www.asp101.com/articles/jacob/scriptupload.asp[/url]
    nordine5 Guest

  6. #5

    Default Re: Creating an upload and a receive page

    Hi everyone...i have one question..i see this creating page for upload image using asp...how to create upload image page using cfm...any idea?
    mardi_marijo Guest

  7. #6

    Thumbs down Re: Creating an upload and a receive page

    Typical. No on really answered the question. It would help if someone could just give him and place to go or an example of how to do it in dreamweaver
    Unregistered Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139