Skip to content

Commit

Permalink
Don't allow to view images inline if opened directly.
Browse files Browse the repository at this point in the history
This services is supposed to process and view images inside a web page.
  • Loading branch information
yunosh committed Apr 20, 2020
1 parent 698b6d7 commit 64127fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/images/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

/* Check if no editing action required and send the image to browser. */
if (empty($action)) {
header('Content-Disposition: attachment');
$image->display();
exit;
}
Expand Down Expand Up @@ -132,4 +133,5 @@
/* Write out any changes to the temporary file. */
file_put_contents($file_name, $image->raw());

header('Content-Disposition: attachment');
$image->display();

0 comments on commit 64127fe

Please sign in to comment.