I'm newbie here on GCS. & trying to read & download files from GCS.
Here i wrote few lines.
from google.appengine.api import files
def download_data_from_gcs(request):
file_name = '/gs/bucket-name-1/new_file.csv' # change bucket/object names to suit your needs
with files.open(file_name, 'r') as f:
data = f.read()
logging.error(data) # I'm getting here csv data. Its around of ~20-25 MB
Now tricky part is to download this data
as is. Ex. new_file.csv
Has someone worked around it? Would appreciate that way.
Thanks