1

Basically, I have a python script that returns as :

response = HttpResponse(zip_file.read(), 
content_type="application/epub+zip")
response['Content-Disposition'] = 'attachment; filename="'+ slugify(node_obj.name) + '.epub"'
return response

On front-end, I display a series of anchor tags, each having a link to create and download a file and all these elements have common class. Also, there is a provision to create and download all files, which does javascript job of looping over all the above anchor tags and triggers the click event after a specific timeinterval.

However, the time taken for generation of each file differs. Hence, setInterval and setTimeout does not apply.

Setting a cookie and periodically checking the downloadComplete flag too is not working as said in this SO post.

rkatkam
  • 2,634
  • 3
  • 18
  • 29

0 Answers0