Uploading a json file from local computers. URLfetch?

148 views
Skip to first unread message

soujiro0725

unread,
Jul 20, 2012, 1:48:20 AM7/20/12
to google-a...@googlegroups.com
GAE for Python!

Hi. I am trying to develop a web service which users can upload json files and modify the data.

Users create json files at local computers, and in the web service page, browse the path to the files and press 'upload'.
Then, a python handler parses the file contents and make necessary changes.

My question is the process of uploading the files from local computers.

Am I supposed to use 'URL fetch' API? by indicating the URL to the local file storage?

Or is there any other possible way to achieve this?


soichi

Drake

unread,
Jul 20, 2012, 1:57:04 AM7/20/12
to google-a...@googlegroups.com

Use the DataStore.

 

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/MBQ6_bOeEtYJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

soujiro0725

unread,
Jul 20, 2012, 1:59:46 AM7/20/12
to google-a...@googlegroups.com
I don't want to save the files.  I want the handler to parse the json file content, and discard it as long as the process is successfully finished.



james jones

unread,
Jul 20, 2012, 2:07:09 AM7/20/12
to google-a...@googlegroups.com

Need to look at multi-part post data

http://webpython.codepoint.net/cgi_file_upload

But instead of saving the file  you want to process ("parse") the file. Beware make sure your parse expressions are simple. GAE does not like compute hogs. 
--

soujiro0725

unread,
Jul 20, 2012, 3:03:42 AM7/20/12
to google-a...@googlegroups.com
Thanks. This seems what I wanted. 

james jones

unread,
Jul 20, 2012, 11:32:37 AM7/20/12
to google-a...@googlegroups.com
Did you get it to work?

On Fri, Jul 20, 2012 at 3:03 AM, soujiro0725 <souji...@gmail.com> wrote:
Thanks. This seems what I wanted. 

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/JT5KJxUcwrUJ.

Dao Linh Viet

unread,
Jul 20, 2012, 12:45:22 PM7/20/12
to google-a...@googlegroups.com

Dao Linh Viet

unread,
Jul 20, 2012, 12:45:50 PM7/20/12
to google-a...@googlegroups.com


On Friday, 20 July 2012 12:48:20 UTC+7, soujiro0725 wrote:

soujiro0725

unread,
Jul 22, 2012, 11:52:47 PM7/22/12
to google-a...@googlegroups.com
Yes! It took me a while but it's working now.

Thanks.


Reply all
Reply to author
Forward
0 new messages