This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import FileResponse | |
from io import BufferedReader, BytesIO | |
def file_response_from_str(content: str, filename: str) -> FileResponse: | |
""" Serves a file response from the given string | |
Args: | |
content: str |