Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 3, 20204 yr From within a plugin, I want to establish the status of a file storage setting. Is it possible to check what or if a Storage Setting Configuration is set to either local or remote S3 storage for a specific file category (say custom emoji, reactions, or theme resources etc)? If so how can I do this? Many thanks.
October 4, 20204 yr Solution if (get_class(\IPS\File::getClass('core_Emoticons')) == 'IPS\File\Amazon') { } if (get_class(\IPS\File::getClass('core_Theme')) == 'IPS\File\FileSystem') { }
October 4, 20204 yr The instanceof operator would also work. if ( \IPS\File::getClass('core_Emoticon') instanceof \IPS\File\Amazon ) { // ... etc ... }