Recently I’d read the documentation about IO abstraction and found two things which can be improved:
First, it is said
Shrine is able to upload any IO-like object that implement methods
#closewhose behavior matches the IO class.
I’ve implemented an object with such methods, but it does not work because Shrine requires to implement one more method -
#size. It would be great to fix the documentation.
Second, when I upload an attachment from Rails, Shrine can extract file name and content type from headers and URL. Unfortunately, I’ve found no information about how to implement such behavior with a custom IO object. It would be great to add some docs which will explain how Shrine will use
original_filename methods when they exist.