Discourse.store.download with an OptimizedImage as an argument. It would in turn attempt to call
#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:
#calculate_filesizeis not called often, because the filesize is saved on OptimizedImage creation, so it’s used mostly for manual filesize recalculation
- we were using
rescue nilwhich swallows all errors