While Firebase Storage security rules can read from Cloud Firestore, they cannot read from the Realtime Database. So what you're trying to do is not a supported feature.
Also see my answer here: Creating Firebase Storage Security Rules Based on Firebase Database Conditions