I'm currently constructing a site one page of which I wish to allow
the user to select from a number of different file type downloads. The
file types will be .docs .jpgs mp3.
I know how to transfer the files to the server but what code do I need
to use to allow user to select and download specific files? Obviously
they can right click on an image and download it that way but what
about zipped files?
Regards Tony 15 3093
In article <9e************ *************@p osting.google.c om>,
tony melnyk <to**@melnyk.fr eeserve.co.uk> wrote: [...] what code do I need to use to allow user to select and download specific files? Obviously they can right click on an image and download it that way but what about zipped files?
Simply create links to the files:
<a href="foo.zip"> Download foo.zip</a>.
--
Jon Bell <jt*******@pres by.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA to**@melnyk.fre eserve.co.uk (tony melnyk) wrote: I'm currently constructing a site one page of which I wish to allow the user to select from a number of different file type downloads. The file types will be .docs .jpgs mp3.
Those are not file types in the Internet context. On the Internet, the
type of a file is indicated by its "Internet media type", such as
application/msword, image/jpeg, or video/mpeg.
I know how to transfer the files to the server but what code do I need to use to allow user to select and download specific files?
You need to provide links to the files, and you should check that the
server sends a correct Content-Type header.
Obviously they can right click on an image and download it that way but what about zipped files?
You can link to zipped files (application/zip) too. Some people have
software that can handle them. Beware that far from "forcing a
download", zipping makes it (namely direct download of the original,
real file format) _impossible_.
Actually you would have got this information faster by checking the
FAQ, specifically http://www.htmlhelp.com/faq/html/med...download-howto
Well, admittedly the FAQ is a bit dusty now, and contains even
questionable advice regarding application/octet-stream.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
On Sat, 7 Feb 2004 07:18:05 +0000 (UTC), Jukka K. Korpela
<jk******@cs.tu t.fi> wrote: You can link to zipped files (application/zip) too. Some people have software that can handle them.
Some?
I would think a better word would be "many", but that's not based on
anything empirical.
Neal <ne*****@spamrc n.com> wrote: You can link to zipped files (application/zip) too. Some people have software that can handle them.
Some?
I would think a better word would be "many", but that's not based on anything empirical.
Undoubtedly "many" would be objectively correct too. But I think "some"
is a better one in this context, since the point is that only some
people have such software. Actually, many people are still using e.g.
old Windows systems that do not contain any unzipping program unless
such a program has specifically been installed. (Besides, even if there
is such a program in the user's system, there's no guarantee that he
can use it.)
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
On Sun, 8 Feb 2004 00:15:04 +0000 (UTC), Jukka K. Korpela
<jk******@cs.tu t.fi> wrote: Neal <ne*****@spamrc n.com> wrote:
You can link to zipped files (application/zip) too. Some people have software that can handle them.
Some?
I would think a better word would be "many", but that's not based on anything empirical.
Undoubtedly "many" would be objectively correct too. But I think "some" is a better one in this context, since the point is that only some people have such software. Actually, many people are still using e.g. old Windows systems that do not contain any unzipping program unless such a program has specifically been installed. (Besides, even if there is such a program in the user's system, there's no guarantee that he can use it.)
So I'd think it would be wise to provide a link to a free unzipper program
if you're offering zips. In fact, there are probably free Word file
viewers which you could link to as well.
Interesting - what files do we feel a user should be expected to be able
to handle? Clearly html, jpg, gif. Others?
Neal wrote: there are probably free Word file viewers which you could link to as well.
I'd be surprised if such a thing existed.
what files do we feel a user should be expected to be able to handle? Clearly html, jpg, gif. Others?
I assume text/html and text/plain. I don't assume too much beyond that.
--
Brian (follow directions in my address to email me) http://www.tsmchughs.com/
Brian wrote: Neal wrote: there are probably free Word file viewers which you could link to as well.
I'd be surprised if such a thing existed.
Surprise:
<http://office.microsof t.com/downloads/2000/wd97vwr32.aspx>
sherm--
Sherm Pendley wrote: Brian wrote:
Neal wrote:
there are probably free Word file viewers
I'd be surprised if such a thing existed.
Surprise: <http://office.microsof t.com/downloads/2000/wd97vwr32.aspx>
:-)
--
Brian (follow directions in my address to email me) http://www.tsmchughs.com/
Neal <ne*****@spamrc n.com> wrote: So I'd think it would be wise to provide a link to a free unzipper program if you're offering zips.
Not really. For example, if someone is using WinXP, he should probably
learn to understand the built-in unzipper rather than look for
something new.
If you offer zips as alternatives to HTML format, just offer them. If
you like, add a link to a page that explains what zip is about, in
layman terms, if you know one.
If you offer zips as the only alternative, a large number of users will
just go elsewhere.
In fact, there are probably free Word file viewers which you could link to as well.
Even more pointless. Who's going to download tens of megabytes of
OpenOffice just to view a document that could be loaded and shown in no
time if it were in HTML?
Interesting - what files do we feel a user should be expected to be able to handle? Clearly html, jpg, gif. Others?
All user agents can handle those, properly served, or present the
author-supplied fallback (the alt attribute) for images. They can also
deal with text/plain (mostly). What else do you need? Surely there are
lots of applications that could be used to enhance pages, but I don't
think we are talking about interactive animations and things like that
here. PDF and Word are just proprietary and inflexible formats for
things that can mostly be better expressed in HTML, for the purposes of
WWW authoring.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Luke StClair |
last post by:
Only marginally belonging in this newsgroup... but oh well.
I've just started writing in python, and I want to make the files
available on the web. So I did the standard <a
href="mypath/myfile.py"> and not surprisingly, it displays like a
webpage, but just the code. If I gzip it, and then link to the new
file, it will download, but its so small I don't want it zipped.
How can I make this into a downloadable
file SIMPLY? The other...
|
by: sales |
last post by:
If you are having difficulty downloading large files, please check out
www.Downloads4Dialups.com. Mention this newsgroup in the "Special
Instructions" window on the Shipping Form, and receive a 20% discount.
Help with downloading large files
|
by: Bala |
last post by:
Hi
I am trying to download the PDF files from my webserver using ASP.Net.
All my files are stored at F Drive on webserver. Like this F:\Main
Folder\Sub Folder\Files\File1.pdf
I am impersonating the domain user account and downloading the file, It
seems the impersonate is got success, but its not download the file. Its
simply downloading some junk pdf file instead of original file.
|
by: just.starting |
last post by:
Hi,
My dot net client downloads files and checks for any new files time to
time. The server is apache2.0.53 server. So what happens is that my
file download thing works fine if I dont try to call any page from the
server while downloading. If I try to call a single page while
downloading a file then the page request goes time out and the server
then closes the existing download stream and the client doestn't throw
any exception. So many a...
|
by: just.starting |
last post by:
Hi,
My dot net client downloads files and checks for any new files time to
time. The server is apache2.0.53 server. So what happens is that my
file download thing works fine if I dont try to call any page from the
server while downloading. If I try to call a single page while
downloading a file then the page request goes time out and the server
then closes the existing download stream and the client doestn't throw
any exception. So many a...
| |
by: just.starting |
last post by:
I am having problem while downloading files from an apache server2.0.53
with php4.3.10.While downloading some files it generally stops after
downloading some specific amount and then stops downloading with the
error message: "the source file could not be read". And the error is
not dependent on the size of the file, as I can download a file of 6MB
but having problem with a file with 652KB. It always stops after
666880bytes.
Thanks.
|
by: aldonnelley |
last post by:
Hi there: a bit of a left-field question, I think.
I'm writing a program that analyses image files downloaded with a basic
crawler, and it's slow, mainly because I only want to analyse files
within a certain size range, and I'm having to download all the files
on the page, open them, get their size, and then only analyse the ones
that are in that size range.
Is there a way (in python, of course!) to get the size of images before
or...
|
by: xeroxero |
last post by:
I would like to prevent people from downloading a .zip from a ASP.NET
2.0 web site, but still allow people to touch a .aspx page in the same
directory. I also want to set things so if a user clicks on a button,
the ASP.NET page will facilitate a download with Response.BinaryWrite.
Is that possible?
Thanks.
|
by: =?Utf-8?B?U2FjaGluIENoYXZhbg==?= |
last post by:
Hi,
I need to download files from the FTP location. This FTP location is
readonly n I dont hv access to delete files from this location once
downloaded. The files to the ftp location keeps adding n I need to download
the recently uploaded files only each time my schedular runs ingnoring the
previously downloaded files as there will be huge number of already
downloaded files n downloading them again is not worth.
How do I acheive this...
|
by: Ehsan |
last post by:
I foundd this code in ASPN Python Cookbook for downloading files in
python but when it finished downloading files the files became
corrupted and didn't open, the files in internet havn't any problem:
def download(url,fileName):
"""Copy the contents of a file from a given URL
to a local file.
"""
import urllib
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |