A few days ago I tried to build a machine that would let you transport items to a chest on the surface if you’re down in a mine. In my example, I didn’t go down a mine but I think it will work regardless of whether you’re on the surface or underground.
I designed it so that a chest in a minecart would hold the items you wanted to transport. When you pressed a button, it would send the minecart whizzing to the surface where the track ended. Under the last rail is a hopper, which will pick up the items and then send the minecart back to you. However, the hopper can only pick up two items at a time, so if you want to send over two items, you have to send the minecart back to the hopper a few times.
Here are the photos: