'Is it able to resume downloading when the connection is lost in Django?

from django.http import FileResponse
def send_file():
    #some processes
    response = FileResponse(open(file_name, 'rb'),as_attachment=True)
    return response

The connection sometimes lost. I want to resume downloading the file. How can I do that? Many thanks.



Solution 1:[1]

You need a iteration for control the download. Here is a example Download large file in python with requests

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 LordPokerFace