added support for a data property instead of a path property to read the data to send from the file object