Beispiel #1
0
    def page(self) -> None:
        site = html.request.get_ascii_input_mandatory("site")
        tarfile_name = html.request.get_ascii_input_mandatory("tarfile_name")
        Filename().validate_value(tarfile_name, "tarfile_name")
        file_content = self._get_diagnostics_dump_file(site, tarfile_name)

        html.set_output_format("x-tgz")
        html.response.headers["Content-Disposition"] = "Attachment; filename=%s" % tarfile_name
        html.write_binary(file_content)
Beispiel #2
0
 def get_request(self):
     # type: () -> str
     tarfile_name = html.request.get_ascii_input_mandatory("tarfile_name")
     Filename().validate_value(tarfile_name, "tarfile_name")
     return tarfile_name