mirror of
https://github.com/discourse/discourse.git
synced 2025-01-27 11:25:16 +08:00
64ce12a758
`OptimizedImage#filesize` calls `Discourse.store.download` with an OptimizedImage as an argument. It would in turn attempt to call `#original_filename` and `#secure?` on that object. Both would fail as these methods do not exist on OptimizedImage, only on Upload. We didn't know about these issues because: 1. `#calculate_filesize` is not called often, because the filesize is saved on OptimizedImage creation, so it's used mostly for manual filesize recalculation 2. we were using `rescue nil` which swallows all errors |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |