Skip to content

Commit

Permalink
[FIX] fix blob url
Browse files Browse the repository at this point in the history
haumenphai authored and phamgiang2510 committed Oct 29, 2024
1 parent 9dd4fae commit fe8f983
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/web_api/api_v1.py
Original file line number Diff line number Diff line change
@@ -84,11 +84,11 @@ async def _try_sign(self, data, signer: signers.Signer, current_call=1, max_try=

async def _sign(self, data, singer: signers.Signer):
file_url = data['file_url']
if file_url.starts_with('blob:'):
file_url.removeprefix('blob:')
response = requests.get(data['file_url'], verify=False, stream=True)
if file_url.startswith('blob:'):
file_url = file_url.removeprefix('blob:')
response = requests.get(file_url, verify=False, stream=True)
if response.status_code != 200:
await self.manager.send_error(f'download {data["file_url"]} error', self.websocket)
await self.manager.send_error(f'download {file_url} error', self.websocket)
return

signature_field_name = data['signature_field_name'] or f'Signature_{random_str(12)}'

0 comments on commit fe8f983

Please sign in to comment.