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
Jul 20 '05
15 3096
On Sun, 8 Feb 2004 21:41:15 +0000 (UTC), Jukka K. Korpela
<jk******@cs.tu t.fi> wrote: Neal <ne*****@spamrc n.com> wrote: 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?
I agree - was just for the sake of argument. 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?
I don't, but someone might think they do. When they find this archived
somewhere in the future, they'll know then.
Brian <us*****@juliet remblay.com.inv alid-remove-this-part> wrote in
news:mHrVb.2054 55$nt4.975966@a ttbi_s51: Neal wrote: 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.
image/png is pretty safe as long as you don't rely on alpha channel
support. audio/mpg (or should that be audio/mpeg) is also pretty safe as
long as you just link to it rather than embed it.
Eric Bohlman wrote: Brian wrote
Neal wrote:
what files do we feel a user should be expected to be able to handle? Clearly html, jpg, gif. Others? text/html and text/plain. I don't assume too much beyond that.
image/png is pretty safe as long as you don't rely on alpha channel support.
As J. Korpela pointed out, images formats are appropriate if
appropriate fallback is available. That is a general principle.
audio/mpg (or should that be audio/mpeg) is also pretty safe as long as you just link to it rather than embed it.
Anything is safe if you link to it. But I don't *assume* the user will
have what is necessary to access it, outside of the two I mentioned
above.
--
Brian (follow directions in my address to email me) http://www.tsmchughs.com/
Neal wrote: what files do we feel a user should be expected to be able to handle? Clearly html, jpg, gif. Others?
Brian <us*****@juliet remblay.com.inv alid-remove-this-part> wrote:
I assume text/html and text/plain. I don't assume too much beyond that.
Even plain text isn't platform generic:
The end-of-line characters being the common pitfall (different systems
use different ones, and handle alternative system's methods with varying
degrees of success).
The character set being another. Trying to view a Mac written plain
text file on another computer often ends up with some gibberish
characters.
And some people's ideas about what's a plain text file are quite wrong.
--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.
This message was sent without a virus, please delete some files yourself.
On Mon, 9 Feb 2004, Tim wrote: Even plain text isn't platform generic:
The end-of-line characters being the common pitfall (different systems use different ones, and handle alternative system's methods with varying degrees of success).
Fair comment
The character set being another. Trying to view a Mac written plain text file on another computer often ends up with some gibberish characters.
Not really, at least with HTTP: that's no different for text/plain
than it is for text/html, so long as the server is doing what it
should and supplying the correct character encoding value on the
charset= attribute of the Content-type header.
(Quite a number of present-day non-Mac-platform browsers support Mac
encodings, for text/html as for text/plain, even though I'd rate the
use of proprietary Mac encodings for interworking as being at least as
rude as using some Other Vendor's proprietary encodings in such a
situation.)
And some people's ideas about what's a plain text file are quite wrong.
There's an RFC that defines it. I give you http://www.cis.ohio-state.edu/cgi-bi...html#sec-4.1.3
Sure, there's a major vendor who sees fit to disregard the RFCs
whenever it suits them, but until they manage to fool enough of the
great unwashed into preferring their proprietary network instead of
the open-protocol Internet (and we can see they're working hard at
that, let's just hope that the public wake up before it's too late),
the RFCs are the right way to go.
Tim wrote: Even plain text isn't platform generic:
...[snip]...
The character set being another. Trying to view a Mac written plain text file on another computer often ends up with some gibberish characters.
"Alan J. Flavell" <fl*****@ph.gla .ac.uk> wrote: Not really, at least with HTTP: that's no different for text/plain than it is for text/html, so long as the server is doing what it should and supplying the correct character encoding value on the charset= attribute of the Content-type header.
That was my main concern: Often, the user won't have control over that,
or doesn't know about it, or know what to do with it.
(Quite a number of present-day non-Mac-platform browsers support Mac encodings, for text/html as for text/plain, even though I'd rate the use of proprietary Mac encodings for interworking as being at least as rude as using some Other Vendor's proprietary encodings in such a situation.)
And some people's ideas about what's a plain text file are quite wrong.
There's an RFC that defines it. I give you http://www.cis.ohio-state.edu/cgi-bi...html#sec-4.1.3
I was thinking more of a user issue, though: Some people think that if
they use WordPad without playing with fonts and things, or SimpleText,
and just save the file "as-is," that they're making a plain text
document. Likewise for those who think that renaming a .doc file to a
..txt file converts it. It's not obvious, to them, that they've created
something that's not plain text.
the RFCs are the right way to go.
No argument from me. Doing things to a standard is the only way to
achieve interoperabilit y and maintainability .
--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.
This message was sent without a virus, please delete some files yourself. 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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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: 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...
| |