Skip to content

Commit

Permalink
release: v0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ninthreezy committed Mar 28, 2022
1 parent 8ee169e commit 7bcf6ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion datatorch/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ def upload_to_default_filesource(self, project: Project, file: IO, **kwargs):
endpoint = f"{self.api_url}/file/v1/upload/{storageId}?path={pathToUploadTo}&import=false&datasetId="
print(endpoint)
# r = requests.post(endpoint, files={"file": file}, user=self.viewer)
r = requests.post(endpoint, files={"file": file}, headers={self.token_header: self._api_token}, stream=True)
r = requests.post(
endpoint,
files={"file": file},
headers={self.token_header: self._api_token},
stream=True,
)
print(r.text)

# def files(self, where: Where = None, limit: int = 400) -> List[File]:
Expand Down
2 changes: 1 addition & 1 deletion datatorch/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ def to_class(self, Entity, results: Union[dict, list, None], path: str = ""):
if type(results) == list:
return list(map(lambda e: Entity(e, self), results))

return Entity(results, self)
return Entity(results, self)
2 changes: 1 addition & 1 deletion datatorch/api/entity/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ def add(self, entity: AddableEntity):
return

if isinstance(entity, Label):
self.create
self.create

0 comments on commit 7bcf6ab

Please sign in to comment.