Does Drupal provide an "uninstall" hook to get notified when a Drupal Stream Wrapper is removed/uninstalled?
Or, is there a way to prevent a custom Drupal stream wrapper from being removed/uninstalled while there is at least one Drupal File entity that is using the stream wrapper?
Currently, for example, a Drupal site will crash if I do the following:
- Install a custom stream wrapper (e.g., https://www.drupal.org/project/s3fs)
- Add a File field to a Node and configure the file field to use this stream wrapper
- Store a file with the file field above
- Uninstall the custom stream wrapper’s module
- Try to view the file field’s contents by opening the node’s page (which will attempt to fetch & render the file).
Thanks!