Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Uploading/Downloading files via HTML

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
dr_gonzo
Asked:
dr_gonzo
1 Solution
 
dorwardCommented:
"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
 
AdelphiCommented:
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
 
sybeCommented:
<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
 
hansamryanCommented:
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
 
robjayCommented:
None of those work for me
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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