define type in pre hook
Merge pull request #9721 from owncloud/enc_define_type_in_pre_hook

[encryption] define type in pre hook