Update public.php

add check ifMimeSupported and put the thumbsize in a variable