Support File object instances

This is useful when working with user dropped images and probably other scenarios.