 |
 |
Safari apending .txt file extensions - how to prevent?
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2002
Location: London, UK
Status:
Offline
|
|
I am downloading files with safari and rather annoyingly, safari insists on adding a .txt extention to each one - even though the files already have an extension.
Even if they didn't it should be my choice. How do I stop Safari renaming my files? I breaking things by trying to be helpful was a Windows trait - next thing we'll have speech bubbles every 2 minutess 
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status:
Offline
|
|
That's not normal behavior for Safari.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
Is this all downloads from multiple different sites or just downloads from one site in particular? If the latter, this is far more likely to be a problem with the set up of the server that you are downloading the files from (the server more than likely has incorrectly assigned mime types). In other words, Safari is being told the files are .txt files when they are not and is therefore doing the "right" thing by assigning the .txt extension to them.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2002
Location: London, UK
Status:
Offline
|
|
Firefox and Opera can download from this site without appending txt to the files.
Safari shouldn't append anything regardless of whether it recognises the mime type or not. It's extremely annoying and if you go to the roots of os X - everything is a file - even directories. os X shouldn't 'need' file extensions so why Safari insists on adding txt to certain files is beyond me.
btw, this is with Safari 2 and now the latest beta 3.
files are file.vce format - vce is an exam simulation file
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
a) Report it to Apple using the Report Bugs... option in the Safari menu.
b) Just because Firefox and Opera don't do this doesn't mean that the source of the issue isn't on the server (I pretty much guarantee you that it is because the mime types haven't been assigned correctly, so you should also inform the site developers as well). What is happening is that Safari is not "failing" as gracefully as Firefox or Opera.
FWIW, if you have a lot of downloads already where this has happened to you and you need to rename them, you can use Automator to create a Finder action to batch rename the files automatically (i.e. change the .vce.txt extension to .vce).
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2002
Location: London, UK
Status:
Offline
|
|
I posted a bug
I have to say that was pretty painless. If only bug reporting was always so easy. (I also use Linux and bug reporting for Gnome et al is mission impossible).
I might try the automator thing. This is my first month with a mac after a few years away so I'm not familiar with some of the new toys.
Thanks for your help
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
FWIW, here's the Automator action you will need to save as a Finder action:
If you want to be safer, include a Finder Copy action to duplicate the files before renamng them first.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2004
Location: Nagoya, Japan • 日本 名古屋市
Status:
Offline
|
|
As JKT notes, it's almost certainly because the server is mis-configured and telling Safari the files contain text data. And since there's no .txt extension, Safari is helpfully adding one.
(I agree, though, that since OS X doesn't rely on file extensions very often, we might be better off without them.)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2002
Location: London, UK
Status:
Offline
|
|
Thanks JKT - that picture paints a thousand words and certainly makes Automator look easy
As for the server being messed up, I don't understand how that would work? I run Apache server and don't recall having to set anything for mime types other than perhaps the 16x16 icons if one enters directory view.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
AFAIK the Apache server software comes with a preset of extension->MIME-type assignments. If a file with an unknown extension (like .dmg) is served with the MIME-type text as a fallback, Safari adds a .txt extension. This behavior is arguably correct. The server tells Safari it is serving a text-file, and a text file needs a .txt extension on Mac to be opened with a text editor. So Safari adds one. Other browsers ignore the server, which is a short term benefit for the user, but in the long run a) makes the server admin not notice the mistake and b) prevents the server admin to use this feature whenever he intentionally wants to (as opposed to unintentionally doesn't care as usually).
Anyway, to fix this you can create a file .htaccess to the respective folder and correctly define the missing MIME-types by adding AddType application/octet-stream .dmg or AddType application/x-stuffit .sit and AddType application/x-stuffit .sitx etc.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|