最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

amazon web services - cancel S3 Download in python - Stack Overflow

programmeradmin3浏览0评论

I have a client app, that downloads potentially big files from S3. I want to give the user the option to cancel that download, without stopping/killing the whole app. Doing some research, that seems to be an suprisingly different task:

  • boto3 does not support canceling S3 downloads :(.
  • I could start a process (using Python multiprocessing) - and kill it to cancel the download. But I fear that would probably leave large chunks already in memory but not saved to the file "lost".
  • I could use some http library and "manual" download the file. If that library supports canceling, that could work. But I also did not find another http library, that supports canceling get requests in progress.

So my questions, aimed at archiving cancelable downloads from S3.

  • Am I right, that running the download in a separate process and killing it could drop larger chunks already download (or other problems)?
  • Did I miss a python http library that supports canceling?
  • Is there another way, to cancel S3 downloads in Python that I may have missed?
发布评论

评论列表(0)

  1. 暂无评论