Skip to content

Commit

Permalink
Merge pull request #16 from emdgroup/fix/2gb_file_upload
Browse files Browse the repository at this point in the history
fix upload for files greater than 2GB
  • Loading branch information
jonas-w authored Apr 27, 2023
2 parents ccc5a91 + 32196ab commit 7ca4e84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].

## [1.0.9] - 2023-04-27

### Fixed

- file upload for files greater than 2GB (#16)

## [1.0.8] - 2023-04-17

### Added
Expand Down Expand Up @@ -96,6 +102,7 @@ and this project adheres to [Semantic Versioning].

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
[1.0.9]: https://github.com/emdgroup/foundry-dev-tools/compare/v1.0.8...v1.0.9
[1.0.8]: https://github.com/emdgroup/foundry-dev-tools/compare/v1.0.7...v1.0.8
[1.0.7]: https://github.com/emdgroup/foundry-dev-tools/compare/v1.0.6...v1.0.7
[1.0.6]: https://github.com/emdgroup/foundry-dev-tools/compare/v1.0.5...v1.0.6
Expand Down
3 changes: 1 addition & 2 deletions src/foundry_dev_tools/foundry_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def upload_dataset_file(
f"{self.data_proxy}/dataproxy/datasets/{dataset_rid}/"
f"transactions/{transaction_rid}/putFile",
params={"logicalPath": path_in_foundry_dataset},
data=file.read(),
data=file,
headers={
"Content-Type": "application/octet-stream",
"Authorization": self._headers()["Authorization"],
Expand Down Expand Up @@ -2073,7 +2073,6 @@ def _get_palantir_oauth_token(
foundry_url: str, client_id: str, client_secret: str = None
) -> str:
if oauth_provider := _is_palantir_oauth_client_installed():

credentials = oauth_provider.get_user_credentials(
scopes=[
"offline_access",
Expand Down

0 comments on commit 7ca4e84

Please sign in to comment.