+ if ($imageCreated) {
+ // Send the image
+
+ $headers = array('Content-type: '. self::$MIMES[$ext],
+ 'Cache-Control: max-age=15552000',
+ 'Content-disposition: inline; filename=' . $filenameForClient,
+ 'Content-Length: ' . filesize($tempFile));
+
+ foreach($headers as $header) {
+ header($header);
+ }
+ ob_clean();
+ flush(); // attempt to send header to client
+ readfile($tempFile);
+ }
+