Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Added UploadFromData Methods #152

Closed
wants to merge 1 commit into from
Closed

Conversation

moizbrohi
Copy link

Currently on Upload from Path is supported.
I have added method
uploadFromData

That can be used like
client.item(drive='me', id='root').children['abc.txt'].uploadFromData(data=file.read())

Along with that get_event_loop() is removed because it generates problem with Django and Flask applications.

@msftclas
Copy link

msftclas commented May 19, 2019

CLA assistant check
All CLA requirements met.

@@ -76,9 +76,6 @@ def __init__(self, http_provider, client_id=None, scopes=None, access_token=None
self._auth_server_url = self.MSA_AUTH_SERVER_URL if auth_server_url is None else auth_server_url
self._auth_token_url = self.MSA_AUTH_TOKEN_URL if auth_token_url is None else auth_token_url

if sys.version_info >= (3, 4, 0):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: this is needed for running the cli in other threads

@@ -59,7 +59,21 @@ def upload(self, content_local_path):
entity_response = self.send(path=content_local_path)
entity = Item(json.loads(entity_response.content))
return entity
def uploadFromData(self, data):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no camel case

@baywet
Copy link
Member

baywet commented Oct 2, 2024

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #209 for more information

@baywet baywet closed this Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants