On Wed, Jul 9, 2014 at 5:28 PM, Sagar Ganapaneni <[email protected]>
 wrote:

> i have tried various examples available over the internet, but not
> successful in uploading a file to GSC bucket. I am able to read the files
> but not write. Please share the sample programs if you any has one
>


Do you need the parse or otherwise read the text of the CSV file (for
instance, creating datastore entities out of the CSV data), or do you need
to just upload a CSV file to GCS?

If you just need to upload a CSV file, use the blobstore API and target GCS
as the storage service:
https://developers.google.com/appengine/docs/python/blobstore/#Python_Using_the_Blobstore_API_with_Google_Cloud_Storage
. The example code presented on that page will upload any file, including
CSV files.

If you need to upload and interpret the CSV file, that changes things. You
can reuse the uploader code above, then read it in and use a standard
library to interpret the CSV text:
https://docs.python.org/2/library/csv.html (there are similar libraries
available for other languages).


-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to