Closed AndreaPiovanelli closed 2 years ago
As we noticed issues when checking paths via out of context calls (e.g. calling the methods via rest apis), we realized ImageProfileManager was the wrong class to test for path format. For this reason, that logic has been moved inside the file storage provider.
We used the same pr as it hasn't been merged yet. Can you check this, @sebastienros?
Reference issue #8602
When generating a image profile, sometimes resulting path can be very long, especially when a user imports a media with a very long file name. As described into the referenced issue, this can throw exceptions and stop Orchard from processing, for instance, resized images displayed as thumbnails in the media gallery. Since profile folders are already hashed, when file name is too long I hashed it the same way, eventually trimming it even more in extreme cases (this may happen when path is really long even before appending the file name).