minio-py
minio-py copied to clipboard
pathlib object support
When I was using your tool earlier, I was calling the functions fput_object
and fget_object
with identical parameters set. I was confused to find I got the error TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
when downloading, but not uploading.
I eventually realized the issue was that I was using a pathlib object for the parameter file_path
. It appears that fput_object
supports the use of pathlib objects, but fget_object
does not.
Casting the file path to a string made the code work, but I think it would be a nice feature to add support for pathlib objects to fget_object
as well.
Please feel free to send a PR