-
Notifications
You must be signed in to change notification settings - Fork 3k
[Storage] Download/Upload Blob APIs Fixes for Transport Compatibility #40490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
12b77f6
0cd044e
67aa9f6
acb52ad
553fa10
02c08bb
a85868e
ba5240a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,8 +46,11 @@ | |
async def process_content(data: Any, start_offset: int, end_offset: int, encryption: Dict[str, Any]) -> bytes: | ||
if data is None: | ||
raise ValueError("Response cannot be None.") | ||
await data.response.load_body() | ||
content = cast(bytes, data.response.body()) | ||
if hasattr(data.response, "load_body"): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is try-except necessary here? File share already has try-except built-in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like transports support either |
||
await data.response.load_body() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
content = cast(bytes, data.response.body()) | ||
else: | ||
content = b"".join([d async for d in data]) | ||
if encryption.get('key') is not None or encryption.get('resolver') is not None: | ||
try: | ||
return decrypt_blob( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adapted sync code to async upload
is_checksum_retry