[SUMMARY]
For a newly uploaded file to Firebase Cloud Storage I want to determine who uploaded the file (the User's ID token) from within a triggered Firebase Function.
[DETAILS]
I'm allowing the Firebase authenticated mobile user to upload a file to Cloud storage. I've attached a Firebase Cloud Storage trigger via Firebase Function with onFinalize. When a new file is added to Cloud Storage it triggers the function.
From within the function is it possible to determine the mobile user's ID token so that i may use Firebase Cloud Messaging to send a message back? Or do i have to upload the file as before then after upload is complete make a reference to the uploaded file then apply metadata to it (eg. add the User's ID Token which belongs to the mobile user)? I would then have to have a Firebase Function trigger on metadata changes -- when a change occurs i can then read out the ID token for whom the newly uploaded file belongs to.
Mobile: Java Android
Firebase Cloud Functions: Node.js