Yes, but a browser needs a proper file extension for a download and a
email client to.
--
You don't always have a mime type.Also there have been some bugs in browsers, if you deliver images with correct mime type, butwithout proper extension.
What about unpacking a zip file? Maybe you get it from windows?I don't know, but I can't imagine that a zip file would preserve file type info, such asthe ones encoded in mime types.
Please you file extension agnostics, can you tell me, in which world do you live and which drugs did you take?
Do you really want to tell me, that there is no need to keep a file extension?
I can't believe it.
Am Montag, 27. Mai 2013 10:42:18 UTC+2 schrieb chris dollin:On 27 May 2013 09:34, meta keule <marcre...@googlemail.com> wrote:
Yes, but a browser needs a proper file extension for a download and a
email client to.Should a browser be using the negotiated media type, not an accidentof the filename [however handy that is to humans]?Chris
--
Chris "allusive" Dollin
--
On Mon, May 27, 2013 at 10:55 AM, meta keule
<marcre...@googlemail.com> wrote:
> Please you file extension agnostics, can you tell me, in which world do you
> live and which drugs did you take?
(I don't like the quoted sentence.) Extensions are useful. Attaching
semantics to an extension is not a good idea, see eg. file(1). Abusing
extension to be the only source of file's semantics, as done by some
(poorly designed) OSs, is not a mistake. That's called "defective by
design", "bug" and "attack vector".
> Do you really want to tell me, that there is no need to keep a file extension?
No, no one said that.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Mon, May 27, 2013 at 1:55 AM, meta keule <marcre...@googlemail.com> wrote:You don't always have a mime type.Also there have been some bugs in browsers, if you deliver images with correct mime type, butwithout proper extension.This seems tangential to anything about filenames from TempFile.
What about unpacking a zip file? Maybe you get it from windows?I don't know, but I can't imagine that a zip file would preserve file type info, such asthe ones encoded in mime types.Files on disk and in archives are, at least in the *nix world, often identified by magic numbers, not file extensions.
Please you file extension agnostics, can you tell me, in which world do you live and which drugs did you take?This statement is unhelpful, and isn't really appropriate for a mailing list through which you wish to receive help and guidance on technical matters. Consider the number of man-hours that will be spent reading your email by the Gophers around the world before you click "Send."
On Mon, May 27, 2013 at 1:55 AM, meta keule <marcre...@googlemail.com> wrote:You don't always have a mime type.Also there have been some bugs in browsers, if you deliver images with correct mime type, butwithout proper extension.This seems tangential to anything about filenames from TempFile.
What about unpacking a zip file? Maybe you get it from windows?
I don't know, but I can't imagine that a zip file would preserve file type info, such asthe ones encoded in mime types.
Files on disk and in archives are, at least in the *nix world, often identified by magic numbers, not file extensions.
Please you file extension agnostics, can you tell me, in which world do you live and which drugs did you take?
This statement is unhelpful, and isn't really appropriate for a mailing list through which you wish to receive help and guidance on technical matters. Consider the number of man-hours that will be spent reading your email by the Gophers around the world before you click "Send."
Files on disk and in archives are, at least in the *nix world, often identified by magic numbers, not file extensions.
(13:06) jnml@fsc-r550:~/tmp$ echo blah > foo
(13:06) jnml@fsc-r550:~/tmp$ echo Mūhldorf > bar
(13:07) jnml@fsc-r550:~/tmp$ file foo bar
foo: ASCII text
bar: UTF-8 Unicode text
(13:07) jnml@fsc-r550:~/tmp$
-j