Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other [Solved] Problem with HTML 5 Download tag

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #161275
    han003
    Participant

    Hi!

    I have a download link like so <a href="Home/Newspaper.ass" download="Newspaper">Download</a>

    But when I click on it and download it it just saves as File, not as .ass as it’s supposed to..

    Any ideas?

    #161276
    Paulie_D
    Moderator

    But when I click on it and download it it just saves as File, not as .ass as it’s supposed to..

    Save as what kind of file?

    What extension does the downloaded file have in Explorer?

    #161277
    han003
    Participant

    This http://s28.postimg.org/u27kgtw59/Capture.png

    Edit: When I tested on live site with chrome it got converted to a .txt file, but still not as a .ass file as it’s supposed to be

    #161280
    Paulie_D
    Moderator

    Hmm…perhaps the receiving computer doesn’t have .ass as an acceptable / recognised file type?

    Chrome wouldn’t (I think) convert it automatically.

    What about other browsers…what do they do?

    Oh…what was in the .txt file? Did you open it?

    Quick google found this: http://stackoverflow.com/questions/2793751/how-can-i-create-download-link-in-html

    #161284
    han003
    Participant

    I’ve downloaded .ass files from other sources before no problem, so it’s acceptable

    Firefox and Opera does the same as Chrome

    #161286
    __
    Participant

    <a href="Home/Newspaper.ass" download="Newspaper">Download</a>

    Your markup specifies “Newspaper” as the download, not “Newspaper.ass”. You are specifying a filename with no extension. That is “what it is supposed to do” (in fact, chrome technically shouldn’t be adding a txt extension).

    File downloads are just that, downloads. There is no implicit conversion. The file extension -on any file- has absolutely no impact on its type/format.

    #161287
    han003
    Participant

    Wow, seriously!
    Since it worked nice for, I guess, ‘common’ files I didn’t think such a minor detail would cause me this much headache!

    Problem solved, thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Other’ is closed to new topics and replies.