Jarek Radosz 64ce12a758
FIX: OptimizedImage#filesize (#10095)
`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
2020-07-06 17:01:29 +02:00
..
2020-05-05 13:46:57 +10:00
2020-05-05 13:46:57 +10:00
2020-06-26 14:36:50 -06:00
2020-01-15 11:27:12 +01:00
2020-04-30 16:48:53 +10:00
2020-06-15 10:05:22 +08:00
2019-10-21 12:08:20 +01:00
2020-05-05 13:46:57 +10:00
2019-05-22 17:39:44 +03:00
2020-05-05 13:46:57 +10:00
2020-05-05 13:46:57 +10:00
2020-07-02 14:23:10 +08:00
2020-04-30 16:48:53 +10:00