更改文件存储的key
This commit is contained in:
@@ -453,7 +453,7 @@ def playwright_post(cookies, content, image_key=None):
|
|||||||
context.close()
|
context.close()
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
||||||
key = f'{uuid.uuid4()}.png'
|
key = f'screenshot/{uuid.uuid4()}.png'
|
||||||
put_object(key, screenshot_content)
|
put_object(key, screenshot_content)
|
||||||
return {'response_url': post_url, 'screenshot_key': key}
|
return {'response_url': post_url, 'screenshot_key': key}
|
||||||
|
|
||||||
@@ -522,7 +522,7 @@ def playwright_comment(cookies, target_url, content, image_key=None):
|
|||||||
context.close()
|
context.close()
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
||||||
key = f'{uuid.uuid4()}.png'
|
key = f'screenshot/{uuid.uuid4()}.png'
|
||||||
put_object(key, screenshot_content)
|
put_object(key, screenshot_content)
|
||||||
return {
|
return {
|
||||||
'response_url': target_url,
|
'response_url': target_url,
|
||||||
@@ -1012,7 +1012,7 @@ def playwright_share(cookies, target_url, content):
|
|||||||
context.close()
|
context.close()
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
||||||
key = f'{uuid.uuid4()}.png'
|
key = f'screenshot/{uuid.uuid4()}.png'
|
||||||
put_object(key, screenshot_content)
|
put_object(key, screenshot_content)
|
||||||
return {'response_url': post_url, 'screenshot_key': key}
|
return {'response_url': post_url, 'screenshot_key': key}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user