If you use shared hosting and cannot change the server configuration, use PHP:
<?php
$file = 'extension.crx';
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/x-chrome-extension');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>
source
This will cause the file (specified by the variable $file) to be loaded using custom headers.
source
share