Safari adding .txt to a .m4v download

Discussion in 'Mac Apps and Mac App Store' started by teabgs, Dec 14, 2005.

  1. teabgs macrumors 68030

    teabgs

    Joined:
    Jan 18, 2002
    Location:
    behind you
    #1
    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
     
  2. eva01 macrumors 601

    eva01

    Joined:
    Feb 22, 2005
    Location:
    Gah! Plymouth
    #2
    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.
     
  3. TDM21 macrumors 6502a

    TDM21

    Joined:
    Jul 7, 2004
    #3
    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.
     
  4. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #4
    Does resetting Safari help? My version of Safari manages to get the extensions named correctly. :eek:
     
  5. Benjamin macrumors 6502a

    Benjamin

    Joined:
    Oct 27, 2003
    Location:
    Portland, OR
    #5
    im to lazy to try atm but changing the info.plist in safari and adding a new doc type might correct this.
     
  6. tangerineyum macrumors 6502

    Joined:
    Feb 16, 2005
    Location:
    Ontario, CA
    #6
    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.
     
  7. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #7
    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.
     
  8. gekko513 macrumors 603

    gekko513

    Joined:
    Oct 16, 2003
    #8
    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
     
  9. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #9
    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.
     
  10. tangerineyum macrumors 6502

    Joined:
    Feb 16, 2005
    Location:
    Ontario, CA
    #10
    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.
     
  11. gekko513 macrumors 603

    gekko513

    Joined:
    Oct 16, 2003
    #11
    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.
     
  12. TBi macrumors 68030

    TBi

    Joined:
    Jul 26, 2005
    Location:
    Ireland
    #12
    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.
     
  13. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #13
    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.
     
  14. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #14
    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.
     
  15. Soulstorm macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #15
    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...
     
  16. TBi macrumors 68030

    TBi

    Joined:
    Jul 26, 2005
    Location:
    Ireland
    #16
    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.
     
  17. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #17
    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.
     
  18. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #18
    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.
     
  19. TBi macrumors 68030

    TBi

    Joined:
    Jul 26, 2005
    Location:
    Ireland
    #19
    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.
     

Share This Page