Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
The Old Man Posted October 3, 2020 Posted October 3, 2020 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.
Solution newbie LAC Posted October 4, 2020 Solution Posted October 4, 2020 if (get_class(\IPS\File::getClass('core_Emoticons')) == 'IPS\File\Amazon') { } if (get_class(\IPS\File::getClass('core_Theme')) == 'IPS\File\FileSystem') { } The Old Man and BomAle 1 1
Ryan Ashbrook Posted October 4, 2020 Posted October 4, 2020 The instanceof operator would also work. if ( \IPS\File::getClass('core_Emoticon') instanceof \IPS\File\Amazon ) { // ... etc ... } The Old Man 1
Recommended Posts