如何限制 Google Cloud Storage 存储桶的文件类型?
How can I restrict the file types of my Google Cloud Storage bucket?
如何限制我的 Google Cloud Storage 存储桶的文件类型?
例如,我如何 select 一个存储桶并精确它只能包含 jpeg、jpg 或 png 并且应该拒绝任何其他类型的文件?
请参阅 policy document conditions for form POSTs. This won't help with other upload mechanisms, however, so you'll have to do that some other way (maybe a Cloud Function,它对上传内容类型进行检查并删除违规者)。
如何限制我的 Google Cloud Storage 存储桶的文件类型?
例如,我如何 select 一个存储桶并精确它只能包含 jpeg、jpg 或 png 并且应该拒绝任何其他类型的文件?
请参阅 policy document conditions for form POSTs. This won't help with other upload mechanisms, however, so you'll have to do that some other way (maybe a Cloud Function,它对上传内容类型进行检查并删除违规者)。