Benches Mail, Safari and messaging

15

Safari Adds Extra ".html" to Downloaded F…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Is there a way to keep Safari from adding the suffix ".html" to files I download that already have the right suffix, like jpg, mov, etc.?

I am using iPower to host my web page. On their file manager page, I can access files that the public uploads at my site. When I click their download button, however, Safari adds an extra ".html" to files that already have the right suffix. So, for example, a file correctly named "Picture.jpg" in the file manager gets downloaded to my desktop as "Picture.jpg.html".

This only happens in Safari. It does not happen in Firefox, or on Windows Explorer or Windws Firefox.

I know I can just delete the extra .html (and then suffer the dialog box that asks if I'm sure), but it's annoying.

What's going on? Any fixes?

15 replies

Sign in or join Beachball Help to reply.

  1. 0

    Richard Setterberg

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    As I kind of expected, the support person at iPower continues to claim it's Safari's problem:

    "I have checked the URL
    http://discussions.apple.com/thread.jspa?messageID=9532567&#9532567 and was able to duplicate the issue. The MIME types of already there on our server. Since the issue is with your Safari browser, I suggest that you contact Apple to resolve your issue."

    I wish I didn't have another reason to use Firefox--for this purpose at least -- but that's where I think I am.

    Thanks everyone for your help.

  2. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi,

    What's going on? Any fixes?

    Without seeing the site, I can't be 100% certain, but it's very likely that the webserver you're hosted on is not correctly setting the MIME types for these file types.

    Safari respects what the webserver tells it, whereas Firefox and IE are a tad more 'pragmatic' and ignores the webserver.

    If you can post a link to an example problem file then I can confirm/deny that idea.

  3. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Richard,

    The link on that page already has the HTML extenstion:

    http://www.setterberglaw.com/uploads/page2/assets/Max3-1.jpg.html

    Should the link not be
    http://www.setterberglaw.com/uploads/page2/assets/Max3-1.jpg ? 🙂

  4. 0

    Richard Setterberg

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Yes, that's my point. The link I provided was exactly what resulted when I downloaded the jpg from my web server using Safari. On the server it appeared as "Picture.jpg." When I downloaded it to my desktop, it was in the form "Picture.jpg.html." Safari added the "html" during the download process. No other browser I have access to does this. I've since added a picture of what the server page and desktop looks like on the page represented by the link above.

    For what it's worth, the iPower guys say it's a Safari issue, not theirs.

    Message was edited by: Richard Setterberg

  5. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Richard,

    I think you missed my point 🙂

    I'm using Firefox at the moment. The file on the page you linked already has the html extension on the file on the server (even before I try to download it).

    Have a look at the page, you'll see what I mean.

  6. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The [original picture link|http://www.setterberglaw.com/uploads/page2/assets/Max3.jpg] you added looks correct. The MIME type is returned as 'image/jpeg' for that.

    For the original file you posted (with the pre-existing .html extension) the MIME type is set to 'text/html' which is technically correct for a html document, but as you say, it's really a jpg image.

  7. 0

    Richard Setterberg

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    You're right; I probably have missed your point and wasn't very clear. I attached the downloaded file to show you what I got, not what I started with.

    Let me try again.

    I set up an upload page on my website. I am using RapidWeaver and a plugin called RapidUpload. The upload page appears in the link I sent.

    To test how it works, I sent my site a file using the upload page.

    I then went to the iPower web server site to get the file I sent. I go to place where the uploads are kept, and it has the file. In my Safari browser window, the file appears as "Max3.jpg." A screen shot of another photo showing what the iPower file manager page looks like is at the site link.

    There is a downward arrow on the iPower site to the right of the file. This is the download icon. When I click on that icon, it downloads the file to my desktop. However, in the process of doing this, it adds an unnecessary and unwanted ".html" to the downloaded file name. The resulting file on the desktop also appears on the screen shot I provided.

    I want to know what I can do to Safari to stop it from doing this. I say "do to Safari" because if I use Firefox or Explorer to download the file to the desktop, this extraneous ".html" does not get added.

  8. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi again,

    I'd still wager it's the MIME type setting on the server that's causing this.

    Can you right-click on the Download arrow and choose to copy the link address to the uploaded image? After that, open a Terminal window (Applications > Utilities > Terminal) and type:


    curl -I <link address from the download arrow>

    That will show the headers the server is sending to the browser about the file. It should say 'image/jpeg' or 'image/jpg'. If it says 'text/html' then that's what Safari is respecting.

  9. 0

    Richard Setterberg

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks for your continuing efforts to help, but no luck.

    After fussing for quite a bit, only thing I can get out of the download icon is the chance to copy the gif, not the underlying file. Option clicking yields the choices on the second screen shot I posted.

  10. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    OK, one more try then.

    After clicking the download arrow in the site manager, the picture download should appear in the Safari Downloads window. Control-clicking that should give you an option to copy the address to the file. Try using that with the curl command to see what it gives you.

    If it's in a password protected area then curl may well show a 404/403 error of course 🙂

  11. 0

    Richard Setterberg

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    It looks to me like you're right. The terminal text reads:

    Last login: Thu May 28 19:09:23 on ttys000

    Divemaster-2:~ user$ curl -I
    http://www.ipower.com/controlpanel/FileManager/m.cmp?cmd=dlfile&p=public_html%2F RapidUpload%2FMax1.jpg

    [1] 13901

    Divemaster-2:~ user$ HTTP/1.1 302 Found

    Date: Thu, 28 May 2009 23:13:00 GMT

    Server: Apache

    Set-Cookie: request_uri=http://www.ipower.com/controlpanel/FileManager/m.cmp%3fcmd%3ddlfile ; domain=ipower.com; path=/

    Location:
    https://secure.ipower.com/secure/login.bml?err=

    Content-Type: text/html; charset=iso-8859-1

    I guess I'll have to go back to iPower and see what they say. There is no question that the content type shows as "text/html".

    I'll report back. Thanks for all your efforts.

    Message was edited by: Richard Setterberg

  12. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Richard,

    I think that is actually correct in this case. The header message is indicating that the file is not publically accessible and is redirecting you to the login page (which is text/html).

    I'd still chase up with the iPower folks though to see if they can double check the MIME type settings the site manager is using for the download functionality.

  13. 0

    iBod

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    If Safari is still adding .html as an extension, then I'm 99% sure iPower are at fault in this case. Safari just obeys what the webserver tells it. In this case, it's claiming the download file is text/html even thought it's really image/jpeg.

  14. 0

    Richard Setterberg

    Imported from the Apple Support Forums via the Wayback Machine 🔗

  15. 0

    Richard Setterberg

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I've since also added the orginal jpg file that made the round trip.