Adds the possibility to receive an object instead of a file