but my problem is there are many details I'm not familiar with.
for instance, based on source code of "helloworld",
first I can add a form to upload the file,
<form action="/process" enctype="multipart/form-data" method="post">
<div>file <input name="titles_file" type="file"></div>
<div> <input value="Submit" type="submit"></div>
<div> <input value="Clear the form" type="reset"></div>
</form>
( refer from
http://groups.google.com/group/google-appengine/browse_thread/thread/fc87a92de8ae1a55)
I changed the Guesbook class as below. and it works to show the file
name as the content. But I don't know how to tell the code to read
inside this file.
class Processfile(webapp.RequestHandler):
def post(self):
greeting = Greeting()
thefile = self.request.params['titles_file']
file_name = thefile.filename
file_value = thefile.value
greeting.author = users.get_current_user()
greeting.content = file_name
greeting.put()
self.redirect('/')
That's why I want some source code and then I can modify the code for
implement my purpose. Thanks.