Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Mac Download Problem

    Donco

    • Schreiberling
    • Beiträge: 258
    Mac Download Problem
    am: 21. September 2011, 04:08:58
    Hallo,

    Ich biete angemeldeten Usern die Möglichkeit über die Kategorie Listenansicht Test-Downloads herunterzuladen. Beim Mac öffnet sich ein neuer Tab und es kommt keine Meldung "Ziel speichern unter". Weiss jemand woran das liegen könnte? Die Zugangsdaten zum Shop und URL habe ich in meinem Profil hinterlegt.

    Beste Grüße

    Marius

    Linkback: https://www.modified-shop.org/forum/index.php?topic=15506.0

    jannemann

    • modified Team
    • Beiträge: 6.275
    • Geschlecht:
    Re: Mac Download Problem
    Antwort #1 am: 21. September 2011, 07:40:15
    Hallo Marius,

    Zugangsdaten finde ich in deinem Profil nicht und wenn ich deinen Shop aufrufe, dann ist dieser offline.

    Schöne Grüße,
    Jan

    Matt

    • Experte
    • Beiträge: 4.241
    Re: Mac Download Problem
    Antwort #2 am: 21. September 2011, 09:20:49
    [...] Beim Mac [...]

    Aha. Mit Camino, Firefox, Flock, Google Chrome, iCab, OmniWeb, Opera, Safari oder Sunrise (um nur mal die wichtigsten zu nennen)?

    Donco

    • Schreiberling
    • Beiträge: 258
    Re: Mac Download Problem
    Antwort #3 am: 21. September 2011, 13:10:27
    Hallo,

    Vielen Dank für die Antworten.

    @Janneman: Der Shop ist im "Offline" Modus. Die Zugangsdaten sind User:  testenadmin@testenadmin.de / Pass: testenadmin

    @Matt: Getestet wurde es bisher mit Firefox und Safari. Diese Browser öffnen auf dem Mac jeweils einen neuen Tab.

    Beste Grüße

    Marius

    Matt

    • Experte
    • Beiträge: 4.241
    Re: Mac Download Problem
    Antwort #4 am: 21. September 2011, 13:48:10
    [...] Diese Browser öffnen auf dem Mac jeweils einen neuen Tab.
    [...]

    Wundert mich irgendwie nicht. Du sagst dem Link ja mit target="_blank", dass genau das geschehen soll.

    Und das fehlende Download-Fenster ist auch schnell erklärt: Jeder Mac hat Quicktime und der spielt das direkt im Browserfenster ab (gerade getestet mit Chrome, Safari, Firefox). Um einen Download zu erzwingen müsstest du bewusst einen falschen Mimetype senden (application/octet-stream bietet sich an).

    Donco

    • Schreiberling
    • Beiträge: 258
    Re: Mac Download Problem
    Antwort #5 am: 21. September 2011, 14:12:49
    Vielen Dank für den Tipp! Im Moment sieht mein Link so aus:

    Code: XML  [Auswählen]
    <a href="{$PRODUCTS_DOWNLOAD}" target="_blank"><img src="{$tpl_path}img/download.png" width="50" title="Trial-Download"></a>

    Hier nehme ich dann das target="_blank" raus. Wie kann ich den falschen Mimetype setzen?

    Matt

    • Experte
    • Beiträge: 4.241
    Re: Mac Download Problem
    Antwort #6 am: 21. September 2011, 16:29:04
    Mimetypes kannst du über die ".htaccess" manipulieren:

    Code: PHP  [Auswählen]
    AddType application/octet-stream .mp3

    Du kannst auch folgendes versuchen, das ist dem Safari und Chrome aber glaube ich wurscht:

    Code: PHP  [Auswählen]
    <IfModule mod_headers.c>
            <FilesMatch "\.mp3$">
                    Header set Content-Disposition attachment
            </FilesMatch>
    </IfModule>

    Donco

    • Schreiberling
    • Beiträge: 258
    Re: Mac Download Problem
    Antwort #7 am: 21. September 2011, 17:22:42
    Ich habe die Datei "_unterverzeichnis_.htaccess" in ".htaccess" umbenannt und ins Root Verzeichnis kopiert. Die Zeile "AddType application/octet-stream .mp3" habe ich hinzugefügt. Irgendwas hab ich falsch gemacht, da der Download noch nicht erzwungen wird. Das target="blank" habe ich aus den Links entfernt.

    Die ".htaccess" sieht jetzt so aus:

    Code: PHP  [Auswählen]
    AddType application/octet-stream .mp3
    # $Id: .htaccess,v 1.5 2005/05/19 17:09:19 Administrator Exp $
    #
    # If your shop runs in a subfolder, for example "www.domain.de/shop/"
    # you can use this .htaccess as a template.
    # Simply search and replace "/xtc_mod/" with the folder-name of your
    # custom installation-folder like "/shop/" or something.
    #
    # Attention: Leave the slashes "/" as is!
    #
    # This is used with Apache WebServers
    #
    # For this to work, you must include the parameter 'Options' to
    # the AllowOverride configuration
    #
    # Example:
    #
    #<Directory "/usr/local/apache/htdocs">
    #   AllowOverride Options
    #</Directory>
    #
    # 'All' with also work. (This configuration is in the
    # apache/conf/httpd.conf file)
    # The following makes adjustments to the SSL protocol for Internet
    # Explorer browsers
    <IfModule mod_setenvif.c>
      <IfDefine SSL>
        SetEnvIf User-Agent ".*MSIE.*" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
      </IfDefine>
    </IfModule>

    # Fix certain PHP values
    # (commented out by default to prevent errors occuring on certain
    # servers)
    #<IfModule mod_php4.c>
    #  php_value session.use_trans_sid 0
    #  php_value register_globals 1
    #</IfModule>

    #-- Turn off ETags in HTTP-header
    #FileETag None

    #-- Call time pass reference error ?!
    #php_flag  allow_call_time_pass_reference On

    #-- XTC Session only on first visit
    #php_flag session.use_trans_sid 0

    #-----------------------------------------
    #- SEO Hartmut König
    #-----------------------------------------
    #-- ! Comment this line, if you get an ERROR 500 !
    #Options +FollowSymlinks

    # http://httpd.apache.org/docs/misc/rewriteguide.html
    RewriteEngine on

    #-- Sitemap
    RewriteRule ^sitemap(.*)\.html$ /xtc_mod/shop_content.php?coID=8 [qsappend,L]

    ##-- Kategorien
    RewriteCond %{REQUEST_URI} (.*):::([_0-9]+):([_0-9]+)\.html$
    RewriteRule (.*):::([_0-9]+):([_0-9]+)\.html$ /xtc_mod/index.php?cPath=$2&page=$3 [qsappend,L]
    RewriteCond %{REQUEST_URI} (.*):::([_0-9]+)\.html$
    RewriteRule (.*):::([_0-9]+)\.html$ /xtc_mod/index.php?cPath=$2 [qsappend,L]

    ##-- Produkte
    RewriteRule (.*)::(.+)\.html$ /xtc_mod/product_info.php?products_id=$2 [qsappend,L]

    ##-- Content
    RewriteRule (.*):_:([0-9]+)\.html$ /xtc_mod/shop_content.php?coID=$2 [qsappend,L]

    ##-- Manufacturers
    RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+):([_0-9]+)\.html$
    RewriteRule (.*):.:([_0-9]+):([_0-9]+)\.html$ /xtc_mod/index.php?manufacturers_id=$2&page=$3 [qsappend,L]
    RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+)\.html$
    RewriteRule (.*):.:([0-9]+)\.html$ /xtc_mod/index.php?manufacturers_id=$2 [qsappend,L]

    ##-- Fehlerseiten auf die Sitemap lotsen
    ErrorDocument 400 /xtc_mod/sitemap.html?error=400
    ErrorDocument 401 /xtc_mod/sitemap.html?error=401
    ErrorDocument 402 /xtc_mod/sitemap.html?error=402
    ErrorDocument 403 /xtc_mod/sitemap.html?error=403
    ErrorDocument 404 /xtc_mod/sitemap.html?error=404
    ErrorDocument 500 /xtc_mod/sitemap.html?error=500

    ##-- BOF - Tomcraft - 2009-09-09 - Use canonical URLs
    # (don't use if your shop runs on a subdomain!)
    #
    #RewriteCond %{HTTP_HOST} !^www\. [NC]
    #RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/xtc_mod/$1 [L,R=301]
    #
    ##-- EOF - Tomcraft - 2009-09-09 - Use canonical URLs

    Matt

    • Experte
    • Beiträge: 4.241
    Re: Mac Download Problem
    Antwort #8 am: 21. September 2011, 20:02:40
    Doch, die Datei wird jetzt als application/octet-stream ausgeliefert. Beeindruckt den Chrome nur nicht, er spiel sie direkt ab. Hast du das mit dem Header mal versucht?

    Donco

    • Schreiberling
    • Beiträge: 258
    Re: Mac Download Problem
    Antwort #9 am: 21. September 2011, 21:34:06
    @Matt, ich habe das mit dem Header versucht. Leider ohne Erfolg.

    Ich editiere mal diesen Beitrag, da ich die Lösung so wie es aussieht gefunden habe. Wenn ich bei der ".htaccess" diese Zeilen hinzufüge scheint es zu funktionieren:

    Code: SQL  [Auswählen]
    <FilesMatch "\.(?i:mp3)$">
          ForceType application/octet-stream
          Header SET Content-Disposition attachment
    </FilesMatch>

    Im FF, Safari und Chrome gibt's keine Probleme.
    14 Antworten
    7747 Aufrufe
    14. August 2011, 13:40:58 von Shorty
    10 Antworten
    6137 Aufrufe
    25. Februar 2016, 13:17:43 von hh040