Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

teabgs

macrumors 68030
Original poster
Jan 18, 2002
2,853
0
behind you
IF anyone can help with this I'd greatly appreciate it. I'm putting up a new site at work. It's for a video podcast, so I have a .m4v file up. When I download it to disk in SAFARI it adds .txt to the end of the file. Yes, I can delete that and then it's fine, but since others might have this problem I want to know if there is something I can do to get rid of this issue. It works fine in IE and Firefox. Also, other vid podcasts DONT do this. I used apple's default "export to iPod" settings to make the video.

Anyone have any suggestions? Any HTML code or anything that can take care of the issue?

Thanks so much
 
i have never come across a workaround for this, just remove the .txt extension and that is all, it happens for me with .rar files.
 
I haven't found anything that would fix this either. This is a common issue if I am downloading files with not so common file names (like .7z). The only alternative, like you said, is to use a different browser.
 
i have this problem too, i made a slideshow that was uploaded to the school server and when ever i downloaded it the .txt extention was added to the movie. I reported it to admin, the problem was never fixed so i assumed it was the school being lazy. I never thought it might just be me. Maybe you can test it.

http://www.csupomona.edu/~cshm/harvest_auction/photo_gallery.htm

The movie is the red link at the top of the page.
 
I just tested it and Safari says it's simply an MP4 until it commences downloading, when suddenly a .TXT comes out of nowhere. :confused:

It's the first time I've seen it happen.
 
Have you made sure m4v is in the mime.types on your web-server?

video/quicktime qt mov m4v

perhaps?

It's either that or one of these, I think:

video/mp4 m4v
video/x-m4v m4v
 
It's really a server issue. Since .m4v is a new extension that Apple made up, a new line would have to added to the swerver's mime.types or equivalent to avoid having it treated as the default text/plain.

If you're on an Apache host and are allowed to use .htaccess files, you can add the line

AddType video/x-m4v .m4v

to work around it.
 
sorry folks but i know next nothing about web hosting, the extent of my job was to create the media that was an acceptable download size that will play on most computers. I handed the finished movie on a cd to a techie and he took care of the rest. If you gave me step by step instructions i can pass along the information.
 
tangerineyum said:
sorry folks but i know next nothing about web hosting, the extent of my job was to create the media that was an acceptable download size that will play on most computers. I handed the finished movie on a cd to a techie and he took care of the rest. If you gave me step by step instructions i can pass along the information.
If it's Linux, he basically just has to edit the file /etc/mime.types, add the line "video/x-m4v .m4v" and then make the webserver reread the config files or restart the service. The procedure may be different on another OS.
 
iMeowbot said:
It's really a server issue. Since .m4v is a new extension that Apple made up, a new line would have to added to the swerver's mime.types or equivalent to avoid having it treated as the default text/plain.

If you're on an Apache host and are allowed to use .htaccess files, you can add the line

AddType video/x-m4v .m4v

to work around it.

I don't see it being a server issue that Safari add's a .txt at the end of the file. Just because the server doesn't recognise it doesn't mean the user doesn't and hence Safari should let the user decide what to call it.
 
TBi said:
I don't see it being a server issue that Safari add's a .txt at the end of the file. Just because the server doesn't recognise it doesn't mean the user doesn't and hence Safari should let the user decide what to call it.
It's intended to avoid the spoofing problem that has so often affected Windows. Since downloaded files typically won't contain Mac metadata, the extension matters.
 
TBi said:
I don't see it being a server issue that Safari add's a .txt at the end of the file.

Safari adds a .txt extension because the server is saying "this is a plain text file". Basically, Safari is respecting what the server is saying. Other browsers seem to ignore the server.
 
Just delete the .txt extension and you will be fine. This happens to me also, sometimes it bothers me, but I guess it will be fixed someday...
 
iMeowbot said:
It's intended to avoid the spoofing problem that has so often affected Windows. Since downloaded files typically won't contain Mac metadata, the extension matters.

I'm curious, what kind of spoofing? That an EXE will be spoofed as an EXE?

You are right though that the extension matters but if the file has a .m4v extension then it already has an extension and doesn't need another one. Now if safari said "hey this is a text file, do you want to add a .txt? yes/no" then that would be fine, but it shouldn't do it automatically for you unless there is no .XYZ in the filename.

People hated clippy in MS word because it would ask you stupid questions like "i see you are writing an e-mail, would you like me to format this as an e-mail" (or something) but hey at least it asked you and didn't do it automatically.
 
I know this is a server issue because it works right on some sites but not others. Take RAR files as an example. On some servers they download correctly as .RAR files, and on others they download as .RAR.TXT instead. I have to manually remove the .TXT before decompressing the RAR archive.
 
TBi said:
I'm curious, what kind of spoofing? That an EXE will be spoofed as an EXE?
No, that an executable will be spoofed as a readme.txt or whatever.

This filename modification stuff isn't something that Apple made up, it comes straight out of RFC 2183 (see "2.3 The Filename Parameter" and "5. Security Considerations"). While that RFC talks about "messages" and "mail" it applies equally to the Web, as HTTP employs MIME.

OS X and Safari have no way to read the mind of the server operator, and cannot tell if a mismatched media type and filename are accidental or intentional. So, they follow the standard.

Recent Safari versions add additional checks, such as that annoying prompt for when something appears to contain an executable file. It's all part of the same healthy paranoia that helps ensure that the end user knows exactly what a remote server is attempting to send.
 
iMeowbot said:
No, that an executable will be spoofed as a readme.txt or whatever.

Yes but an EXE with a TXT extension in windows won't do any harm. So it's spoofed but not really a good one. What good is a program which doesn't run? I do know that you could probably hide a virus in a txt file and have another non-virus file which renames it and executes it, they've done that with jpg's before. You could do that even with it being a .txt file too though.

I'd love to know what harm would come from not actually adding the .txt extension.

Adding all these mime types to a website seems like an awful lot of hassle when the file name contains the proper extension. As said i don't see the security benefit of it. Maybe you can enlighten me as to what i am missing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.