Hi, I have built a Shiny app that allows users to upload a .txt file, filter for key terms and then download the returned dataset. When hosting locally it works. However, when I deployed it to shiny apps.io the download function no longer works. Everything else (e.g the data upload + wrangling step) do work. Nothing comes up as an error in the code log. The file it downloads is called 'downloadData.html' and simply says 'Please wait. Loading'. When I run and download locally it returns a .txt file (which is strange as the function is write.csv). My code is
It seems to be an issue with the way you are using the company_data reactive in different places.
Company_data seems to be a data frame and you are using this to set the filename and message.
Try the code below and you probably see what's going wrong: paste(mtcars, ".csv", sep = "")
Hi @ginberg, thanks for your help. Unfortunately changing the message to not include a data frame has not solved it and there is no way to share .txt files on the forum (as far as I'm aware). The app should work, though, with any .txt file that is saved with UTF-8 encoding. I have managed to work out where the issue might be occurring though. When the query just returns one result (e.g. a data frame with one string) the app works fine. It's when the query returns more than one that it does not work.
If you'd like I can upload an appropriate .txt file to a file sharing site.
I don't know what has changed since @ginberg's suggested edits but after removing the iris debugging example and substituting the old code it has begun to work. Thanks for your help. The final code was: