upload method can now recieve a file-like object instead of a filename