Fixed issue #6
-- New requirements assumed file object to be sent instead of filename.