Do not aggresively close wfile in the do_GET method in the BasicAuthHandler.
Attach a file by drag & drop or click to upload