'Return a content from a text file in Flask [duplicate]

I tried to return a content from a text file in Flask but I have only the name of the file not the content

    return "http://{ip}:{port}/s/{x}.txt".format(ip=ip, port=port, x=x)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source