Okay
  Public Ticket #2416925
Theme bug - File names changes on download
Closed

Comments

  • Andreas started the conversation

    Hi guys, I recently bought the lifetime package and currently I am using the Indigo theme to build my new site. On this site I want to provide downloads for music files and I encountered a problem which changes file names during download. While the correct download link points to the correct file, the file's name was changed based on the track name - which is derived from the tracks' meta data when creating a playlist. I didn't want the file name to be changed and asked for help on the facebook messenger but with no luck. A friend of mine who is a professional programmer looked at the theme and found a serious bug in ../themes/sonaar/includes/sonaar-music/includes/widgets.php - this is what he thinks about it:

    The problem is this line (around line 855):

    $download = ' download="' . $track['track_title'] . '"';

    It causes the Download-Link to output as follows (example):

    <a href="..." download="This is my song title“ ...>...</a>

    This tells e.g. Chrome not to open the file, but to download it, and change the filename to the given attribute of „download“, so my mp3-file will be named „This is my song title.mp3“.

    With Firefox even the file type ending is stripped, the file is then named „This is my song title“ without any file type ending, so the operating system doesn’t know what to do with the file.

    This behavior I consider as a serious bug / flaw in your programming.
    In my opinion a better solution would be to generate the link only as
    <a href="..." download ...>...</a>

    which tells the browser to download the file while keeping the file name (which was given with intent!) …


  • Andreas replied

    It would be great to rename the ticket to "Theme bug - File names changes on download"

  •  669
    Alexandre replied

    Yes. Agree. 
    This will be part of the next theme update.

    Thanks,


    Alexandre from the Sonaar.io Crew