下面是我代码:
async def uploadin_files(file_path):
for files_to_upload in file_path:
time.sleep(2)
blob_client = blob_service_client.get_blob_client(container=azure_container, blob=files_to_upload)
with open(files_to_upload, 'rb') as datax:
chunk_data_original = datax.read()
test = blob_client.upload_blob(chunk_data_original, overwrite=True)
print(files_to_upload,"Done uploading",test)
await uploadin_files(file_path_main)
我想在上传时暂停和恢复文件,有没有可能的方法或没有办法?
1条答案
按热度按时间ubof19bj1#
我可以使用下面的代码终止函数:
但是我如何按预期暂停/恢复功能。