在 GAE 中将文件上传到 GCS (Python)
Uploading a file to GCS in GAE (Python)
我正在通过 GAE 将文件上传到我在 GCS 中的存储桶
upload_url = blobstore.create_upload_url('/upload', gs_bucket_name='my_bucket')
如文档中所述,this question
一切正常,但是,当我尝试阅读内容时,我发现文件名正在更改为一个键值,例如:
L2FwcGhvc3RpbmdfcHJvZC9ibG9icy9BRW5CMlVwOW93MmJzVWRyZ2RQSHJpMlNhMkZNUkloYm9xcnZnZlFzNEZCYnpWaGNENGkROOFk5b2pHSHBMcDIwcGVrVFZtYzdROHRDRWFpdy50YTNpMFdpNmNCQU9NU0xt
有什么办法可以得到上传的文件名吗?
提前致谢
参见:https://cloud.google.com/appengine/docs/python/blobstore/#Python_Using_the_Blobstore_API_with_Google_Cloud_Storage
"In your upload handler, you need to process the returned FileInfo metadata and explicitly store the GCS filename needed to retrieve the blob later."
有关 FileInfo 的更多信息:https://cloud.google.com/appengine/docs/python/blobstore/fileinfoclass
我认为这个问题类似于 How to get FileInfo/gcs file_name for files uploaded via BlobstoreUploadHandler?
我正在通过 GAE 将文件上传到我在 GCS 中的存储桶
upload_url = blobstore.create_upload_url('/upload', gs_bucket_name='my_bucket')
如文档中所述,this question
一切正常,但是,当我尝试阅读内容时,我发现文件名正在更改为一个键值,例如:
L2FwcGhvc3RpbmdfcHJvZC9ibG9icy9BRW5CMlVwOW93MmJzVWRyZ2RQSHJpMlNhMkZNUkloYm9xcnZnZlFzNEZCYnpWaGNENGkROOFk5b2pHSHBMcDIwcGVrVFZtYzdROHRDRWFpdy50YTNpMFdpNmNCQU9NU0xt
有什么办法可以得到上传的文件名吗?
提前致谢
参见:https://cloud.google.com/appengine/docs/python/blobstore/#Python_Using_the_Blobstore_API_with_Google_Cloud_Storage "In your upload handler, you need to process the returned FileInfo metadata and explicitly store the GCS filename needed to retrieve the blob later."
有关 FileInfo 的更多信息:https://cloud.google.com/appengine/docs/python/blobstore/fileinfoclass
我认为这个问题类似于 How to get FileInfo/gcs file_name for files uploaded via BlobstoreUploadHandler?