Loading ImageUtils.php +3 −7 Original line number Diff line number Diff line Loading @@ -31,16 +31,12 @@ class ImageUtils return new Filesystem($adapter); } public static function downloadImage(Filesystem $fs, string $path, string $name) : void{ public static function downloadImage(Filesystem $fs, string $path, string $name){ $mimetype = 'application/octet-stream'; $filesize = $fs->fileSize($path); $encodedFilename = urlencode($name); header("Content-Type: {$mimetype}"); try { $filesize = $fs->fileSize($path); header("Content-Length: {$filesize}"); }catch(Exception $e) { error_log($e->getMessage()); } header('Accept-Ranges: none'); header('Content-Disposition: inline' . ";filename=\"{$encodedFilename}\";filename*=UTF-8''{$encodedFilename}"); header('Cache-Control: private'); // Workarounds for IE weirdness Loading Loading
ImageUtils.php +3 −7 Original line number Diff line number Diff line Loading @@ -31,16 +31,12 @@ class ImageUtils return new Filesystem($adapter); } public static function downloadImage(Filesystem $fs, string $path, string $name) : void{ public static function downloadImage(Filesystem $fs, string $path, string $name){ $mimetype = 'application/octet-stream'; $filesize = $fs->fileSize($path); $encodedFilename = urlencode($name); header("Content-Type: {$mimetype}"); try { $filesize = $fs->fileSize($path); header("Content-Length: {$filesize}"); }catch(Exception $e) { error_log($e->getMessage()); } header('Accept-Ranges: none'); header('Content-Disposition: inline' . ";filename=\"{$encodedFilename}\";filename*=UTF-8''{$encodedFilename}"); header('Cache-Control: private'); // Workarounds for IE weirdness Loading