IPhone 6, when I plug it up to charge I get a ding and then a box pops up to allow or don't allow device to assess photos or videos. Why?

IPhone 6, when I plug it up to charge I get a ding and then a box pops up to allow or don't allow device to assess photos or videos. Why?

Added (1). IPhone 6, when I plug it up to charge I get a ding and then a box pops up to allow or don't allow device to assess photos or videos. The charger keeps going on and off on and off and dinging each time.

Change your settings. Go to "notifications" to get rid of the ding.

Where in notifications?

Trying to ask if you are in charging mode or external drive mode.
Drive/memory mode, you can access memory on the phone and still charges the battery. A slower charge rate.