function get($s) // determin what to serve!!!!
{
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
- error_log($s);
+
$bits= explode('/', $s);
$id = 0;
// without id as first part...
function post()
{
+
+ if (!$this->authUser) {
+ $this->jerr("image conversion only allowed by registered users");
+ }
// converts a posted string (eg.svg)
// into another type..
if (empty($_REQUEST['as'])) {
}
//echo "SKALING? $this->size";
// acutally if we generated the image, then we do not need to validate the size..
- $this->validateSize();
+
+ // if the mimetype is not converted..
+ // then the filename should be original.{size}.jpeg
+ $fn = $img->getStoreName() . '.'. $this->size . '.jpeg'; // thumbs are currenly all jpeg.!???
+ // var_dump($fn);
+ if (!file_exists($fn)) {
+ $this->validateSize();
+ }
$x->convert( $this->as_mimetype, $this->size);
$x->serve();