def upload(args, parser):
    """ upload command

    The upload command will send data to the Dashboard API.

    The --proc-id argument will upload contents of PROC_ID file
    The --upload-file argument will upload the specified file
    The --upload-dir argument will upload all JSON files directly under the specified directory.
    """
    emop_upload = EmopUpload(args.config_path)
    if args.proc_id:
        upload_status = emop_upload.upload_proc_id(proc_id=args.proc_id)
    elif args.upload_file:
        upload_status = emop_upload.upload_file(filename=args.upload_file)
    elif args.upload_dir:
        upload_status = emop_upload.upload_dir(dirname=args.upload_dir)

    if upload_status:
        sys.exit(0)
    else:
        sys.exit(1)