Skip to content

Commit

Permalink
Make file upload handle ~ in file path
Browse files Browse the repository at this point in the history
  • Loading branch information
nakedmcse committed Apr 20, 2024
1 parent f16e4cf commit 5a2b015
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "waifuvault"
version = "1.3.8"
version = "1.3.9"
authors = [
{ name="Walker Aldridge", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/waifuvault/waifuvault.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def upload_file(file_obj: FileUpload):
header_data = None
else:
multipart_data = MultipartEncoder(
fields={'file': (os.path.basename(file_obj.target), open(file_obj.target, 'rb'))}
fields={'file': (os.path.basename(file_obj.target), open(os.path.expanduser(file_obj.target), 'rb'))}
)
header_data = {'Content-Type': multipart_data.content_type}

Expand Down

0 comments on commit 5a2b015

Please sign in to comment.