I've never done this, but my understanding it that it should be very easy using http protocol. A webpage hosted by the esp, maybe the root web page, would include link(s) to the files(s) available to be downloaded. When the user clicks such a link, a request for that file name will be sent to the esp. The esp will see the requested file name and detect that a download file has been requested, rather than the root webpage or other webpage. It would then open the SD card file, read each record from it, and print them to the requesting client, in CSV or other text format. The user's browser, knowing that the requested page is a .CSV or .TXT, rather than a .HTML webpage, would treat the response from the esp as a download file and save it to the downloads folder. I think it should be as simple as that.