google app engine - GAE/python: How to parse multipart data file from Cloud Storage (GCS)? -
i uploading file gcs (input file webform) following gae/python code:-
fx = self.request.body_file gcs_file = gcs.open(_gcs_bucket_name + "new_file_name", 'w') gcs_file.write(fx.read())
i able retrieve uploaded data gcs following code
gcs_file = gcs.open(_gcs_bucket_name + "new_file_name", 'r') self.response.write(gcs_file.read())
since uploaded data multiform data, how extract original file name, , original file (binary data) gcs_file.read() ?
you can save file in gcs original file name
or
you can create small datastore db entity having data of original file name , reference file in gcs
why should original binary different?
if have managed download gcs can verify binary same.
Comments
Post a Comment