how to code html to click and download?

A

Amy

Can you please tell me how to code html link, so that user can click and
download the entire folder?

Also, how to code html link, so that user can open this folder directory?

Thank you.
 
R

Richard

Can you please tell me how to code html link, so that user can click and
download the entire folder?

Also, how to code html link, so that user can open this folder directory?

Thank you.

Pack the contents into a zip file.
Makes transferring of content quicker.
 
D

Dave Patton

Can you please tell me how to code html link, so that user can click and
download the entire folder?

HTML is a markup language - it tells the browser how the
webpage is 'marked up'. It's not something you "code"
in the sense of a programming language.

If some HTML contains an anchor tag then most browsers
will, when a user 'clicks' on a link(presented due to
the presence of the anchor tag), send a request for the
anchor tag's href attribute URI to a webserver.

Once that's done, it's the job of the webserver to respond.
There are a variety of ways to, at that point, "download
the entire folder", but they all require configuration
and/or programming on the webserver.

For example, you might be using Apache and PHP, and have
the URI be http://www.example.com/download_dir/ and have
an index.php script in /download_dir which puts all the
files except itself that exist in /download_dir into
a ZIP file and then sends that to the browser, which will,
depending on the user's preferences, either open the
ZIP file or save it to their harddisk.
Also, how to code html link, so that user can open this folder directory?

For example, you might be using Apache, and have
the URI be http://www.example.com/download_dir/
and not have any index document in /download_dir
(e.g. no index.php, index.html, etc.), and have
Apache configured to present a directory listing.
http://httpd.apache.org/docs/mod/mod_autoindex.html
 
A

Amy

OK.

I set up this link:
<a href="URL filename.extension">Click here to download this file</a>
it did not download the zip files?
How do I set up the html code at the link?
 
A

Amy

You mean something like this?

<a href="URL foldername">Click here to download this file</a>

My folder has no index file of any kind.
Just a bunch zip and pdf files.
 
A

Amy

Actually, it would be nice and simple, if I can just let users to open my
folder and download selected items inside the folder. How do I do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top