package with different file import

Permalink
Hi,

I want a package to import images in a different way to normal upload (through the backend f.i.): when uploading on a single page in the package, the files have to be added to certain sets.

In the package/controller.php i added in the on_start():

$ft = FileTypeList::getInstance();
$ft->define('jpg,jpeg,jpe', t('JPEG'), FileType::T_IMAGE, 'imagegbx', 'image', 'image', $this->pkgHandle);


then i added the file package/libraries/file/types/imagegbx.php with the code for import.

This works fine BUT now normal upload through the filemanager in the backend also uses the file inspector from imagegbx instead of using the normal concrete/libraries/file/types/image.php as i expected.

is something wrong with my expectation?

thanks in advance.