How to Create an Upload Link to a Websiteby Anna Roberts
Creating an upload link on a Web page allows your visitors to send you files quickly without the need for an email address. This method works well if you want users to be able to upload photos and other images, or if there is a large amount of information to be transmitted. It is also one way to receive PDFs and other documents like resumes. This method uses an HTML form tag to allow file uploads.
Type <form method="post" action="upload.cgi". Upload.cgi is a URL to a CGI script to parse the form data. You can write your own script if you know how. Otherwise, download one from the Internet. You can get some simple ones from Elizabeth Castro at Cookwood (see Resources below).
Type a caption for the file upload area like "Upload your file here."
Type <input type="file". This code creates a "Browse" button and the file upload field.
Type name="title". Title tells the server which files are being uploaded through the form; "resumes," for example.
Type size="n". "N" is the number of characters allowed in the file upload field. Set it to 40 or 50 since file paths can be quite long.
Type /> to close the input tag.
Type <input type="submit"/> to create a submit button.
Type </form> to close the form tag.
- check Always use method="post" for the upload form, not method="get".