{section: Downloads} -Put the files up for download! There is no reason to not just offer for download the exact same files created for streaming (below). Might be a symlink. +Put the files up for download! There is no reason to not just offer for download the exact same files created for streaming (below). -You might want to ensure the web server sets the Content-Disposition header so that it's downloaded and not viewed in browser. {link: http://www.jtricks.com/bits/content_disposition.html promising looking summary of the technique} +One solution: + +1: {code}cd where-ever-your-web-page-is{endcode} +2: {code}mkdir download{endcode} +3: {code}cd download{endcode} +4: {code}ls ../*.mp4 ../*.webm | xargs -n1 --replace ln -s '{}' ./{endcode} +5: {code}cat > .htaccess <<END +AddType application/octet-stream .mp4 +AddType application/octet-stream .webm + +<Files "*"> + Header set Content-Disposition attachment +</Files> +END +{endcode} + +The .htaccess file ensures the files are served without a useful MIME type, discouraging browsers from trying to use them, and adds "Content-Disposition: attachment", which tells browsers to default to offering to save the file. + +Having the .htaccess file do this requires that the main Apache configuration allow it. As of October 2014, the CSL's web server does.2 {section: Streaming}