Determine Upload Type

This may be a simple question, but I can't find a clear answer.

I have an app where a user can upload a photo or a video from their gallery. If it is a photo, I want to save the URL in a local app state as a photoURL, if it is a video, I want to save it in the local app state as a videoURL.

The issue is I can't see a clear way to determine which the user uploaded - a photo or a video.

This is probably easy, but can anyone show me how this is done?

1 reply