Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion slack/web/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ async def files_upload(
)

if file:
if "filename" not in kwargs:
if "filename" not in kwargs and isinstance(file, str):
# use the local filename if filename is missing
kwargs["filename"] = file.split(os.path.sep)[-1]
return await self.api_call(
Expand Down
2 changes: 1 addition & 1 deletion slack/web/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ def files_upload(
)

if file:
if "filename" not in kwargs:
if "filename" not in kwargs and isinstance(file, str):
# use the local filename if filename is missing
kwargs["filename"] = file.split(os.path.sep)[-1]
return self.api_call("files.upload", files={"file": file}, data=kwargs)
Expand Down