1

I am using GAE with Java to dynamically create a "text file" based on information provided in a form. With the form parameters, I successfully generated a String that should serve as the text in the txt file. However I am not sure exactly how to get that String in an easy to read format. Ultimately, I would like to have an iOS app be able to read the text. These are the two routes that I was thinking of using, but I've encountered problems with both.

  1. Store the text in the database then showing that in another page. Unfortunately I exceed the 500 char limit for a String with GAE. I then tried using the Text class, but as it's not queryable, I'm not sure how to access it from a jsp page.

  2. Dynamically generate a text file with the String of file contents. This option seems more of the "right way" by actually creating a new file. To be quite honest, I just don't know how to do that. I have looked extensively online, but have not found an answer. I've looked into Blob API, but what that allow me to create a brand new file that can be accessed at another URL location? Most of the documentation deals with images or other file types.

All responses are very much appreciated. Thanks.

1 Answer 1

1

For 1, just remember the key of the entity, and fetch an entity with that key afterwards. For 2, you can serve text files as well. Now we're offering Google Cloud Storage integration, so it might be a better option.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the response. I looked more into serving text files with blobstore and was able to serve a text file. But in order to read the text file later I think I need a finite URL. Currently, because the Blobstore key changes depending on the file, I can't get access to the most recent file, which is what I would like to do. Is it possible to either use one blobstoer key, or save the file with a URL ending in .txt?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.