code: def api_submit():
      
      data = request.files.file
      response.content_type = 'application/json'
      if not data or not hasattr(data, 'file'):
          return json.dumps({"status": "Failed", "stderr": "Missing form params"})
      return json.dumps(analyse_pcap(data.file, data.filename), default=jsondate, indent=4)
docs: Blocking POST handler for file submission.
      Runs snort on supplied file and returns results as json text.