@@ -4638,10 +4638,10 @@ def download_file_from_internet_file(url, **kwargs):
46384638 return download_file_from_pysftp_file (url , ** kwargs )
46394639 return download_file_from_sftp_file (url , ** kwargs )
46404640
4641- if p .scheme in ("data" ):
4641+ if p .scheme in ("data" , ):
46424642 return data_url_decode (url )[0 ]
46434643
4644- if p .scheme in ("file" ):
4644+ if p .scheme in ("file" or "" ):
46454645 return io .open (unquote (p .path ), "rb" )
46464646
46474647 if p .scheme in ("tcp" , "udp" ):
@@ -5433,7 +5433,7 @@ def upload_file_to_internet_file(fileobj, url):
54335433 if __use_pysftp__ and havepysftp :
54345434 return upload_file_to_pysftp_file (fileobj , url )
54355435 return upload_file_to_sftp_file (fileobj , url )
5436- if p .scheme in ("file" ):
5436+ if p .scheme in ("file" or "" ):
54375437 outfile = io .open (unquote (p .path ), "wb" )
54385438 try :
54395439 fileobj .seek (0 , 0 )
@@ -5442,7 +5442,7 @@ def upload_file_to_internet_file(fileobj, url):
54425442 with io .open (unquote (p .path ), "wb" ) as fdst :
54435443 shutil .copyfileobj (fileobj , fdst )
54445444 return fileobj
5445- if p .scheme in ("data" ):
5445+ if p .scheme in ("data" , ):
54465446 return data_url_encode (fileobj )
54475447 if p .scheme in ("tcp" , "udp" ):
54485448 parts , o = _parse_net_url (url )
0 commit comments