Here is the code to serve a file via https, But I receive https response without header variable “Content-Disposition:attachment; filename=logs.zip” and recieved content of the file in response body !
Am I missing anything here ? I hope adding Content-Disposition will enable browser client to download file.
if (lws_serve_http_file(wsi, "/tmp/log.zip", "application/zip", NULL, 0) < 0) {
lwsl_err("Failed to serve file: %sn", "/tmp/log.zp");
lws_return_http_status(wsi, HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL);
return ;
}
Thanks for the support