def METHOD_NAME(filepath: str) -> str:
    file_id = generate_random_string(10)
    file_extension = PurePath(filepath).suffix
    filepath_in_container = f"/data/documents/{file_id}.txt"
    orig_file = requests.get(filepath, timeout=FILE_SERVER_TIMEOUT)
    orig_file_text = get_text_from_fileobject(orig_file, file_extension)
    with open(filepath_in_container, "w") as f:
        f.write(orig_file_text)
    return filepath_in_container