def METHOD_NAME():
    """Unpack the common, pre-defined metadata for all the uploaded files."""
    try:
        meta = json.loads(request.form.get("meta", "{}"))
    except Exception as ex:
        raise BadRequest(str(ex))
    validate(meta, "DocumentIngest")
    foreign_id = stringify(meta.get("foreign_id"))
    if not len(request.files) and foreign_id is None:
        raise BadRequest(
            response=jsonify(
                {"status": "error", "message": "Directories need to have a foreign_id"},
                status=400,
            )
        )
    return meta, foreign_id