?
Solved

Uploading/Downloading files via HTML

Posted on 2003-03-25
5
Medium Priority
?
185 Views
Last Modified: 2013-11-19
Okey. I guess downloading can be done by also haveing an ftp-server with the files and linking to it from the HTML-page.

But how can I make my page able to upload?
If I would like something like "attach file" in
Hotmail... Do I need dynamic HTML and in that case
what kind of dynamic HTML?
0
Comment
Question by:dr_gonzo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Expert Comment

by:dorward
ID: 8202248
"Dynamic HTML" is a buzzword, generally it means HTML+CSS+DOM+Javascript.

For this task you need a form and a server side process to handle the form submission.

http://www.cs.tut.fi/~jkorpela/forms/file.html
http://www.htmlhelp.com/faq/html/forms.html#file-upload
0
 
LVL 3

Accepted Solution

by:
Adelphi earned 2000 total points
ID: 8204193
A simple HTML form will allow the browser to ask for a file to upload, just use this input code:

<input type="file" name="myFile">

That shows the "browse" button that allows the user to browse their drive to choose a file.

Then you'll need a way to receive and store the file on the server.  

If you are using FrontPage to handle your forms, you can designate where the uploaded files are saved by going to Form Properties...Options...File Upload.

Otherwise, check with your host server...they may have a file upload product installed.  

I've used Soft Artisans file upload...works great...this is something like the code you would have:

On the form page that the user sees:

<form method="post" action="save.asp">
<input type="file" name="myFile">
</form>

On SAVE.ASP:

<%
Dim objFile
Set objFile = Server.CreateObject("SoftArtisans.FileUp")
if not(objFile.form("myFile").IsEmpty) then
  ("myFile").SaveAs "c:\path\" & objfile.form("myFile").shortFileName
end if
Set objFile = nothing
%>
0
 
LVL 28

Expert Comment

by:sybe
ID: 8205429
<form method="post" action="save.asp">
<input type="file" name="myFile">
</form>

is not enough, it should be:

<form method="post" action="save.asp" enctype="multipart/form-data">
<input type="file" name="myFile">
</form>

for catching the form on the server are numerous solutions. Even for ASP there are many solutions, including pure-script solutions. See http://www.aspfaq.com/show.asp?id=2189
0
 

Expert Comment

by:hansamryan
ID: 8206773
You will need to see what server side languages your server handles.

Second, see if any components are installed to handle the server side upload function. Because, installed components are more stable and can handle larger files then pure scripting uploaders.
0
 

Expert Comment

by:robjay
ID: 14963177
None of those work for me
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question