Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions functions/v2/storage/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import functions_framework


# [START functions_helloworld_storage]
# Triggered by a change in a storage bucket
def hello_gcs(cloudevent):
data = cloudevent.data
@functions_framework.cloud_event
def hello_gcs(cloud_event):
data = cloud_event.data

event_id = cloudevent["id"]
event_type = cloudevent["type"]
event_id = cloud_event["id"]
event_type = cloud_event["type"]

bucket = data["bucket"]
name = data["name"]
Expand Down
1 change: 1 addition & 0 deletions functions/v2/storage/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
functions-framework==3.0.0