Fixed file uploading

Just fixed file uploading by sending a File object (to RestClient) instead of the path.