I need to develop an api in which zip file is stored in server and gets synced at client side when requested by it. Is there a way to do that?
CodePudding user response:
To return a file flask provides the send_file()
function.
return send_file('<FILE_PATH>', as_attachment=True, attachment_filename='<FILE_ATTACHMENT_NAME>')
Here the link to the documentation