fix the error of unable to retrieve url from file (#10498)
This commit is contained in:
parent
05d43a4074
commit
5eb27afd63
3 changed files with 28 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ def get_attr(*, file: File, attr: FileAttribute):
|
|||
case FileAttribute.TRANSFER_METHOD:
|
||||
return file.transfer_method.value
|
||||
case FileAttribute.URL:
|
||||
return file.remote_url
|
||||
return _to_url(file)
|
||||
case FileAttribute.EXTENSION:
|
||||
return file.extension
|
||||
case _:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue