The first thing that you do need, is a public IP address. Something that machines can find over the net by name. Something to arrange with your ISP.
Second, file sharing across WAN means more lag than in LAN. That may, or may not, be annoying.
Third, traffic will be routed. Windows sharing protocol, SMB, is not very good at it. Not to mention that every router along the route might watch what gets passed. So clear connection is unnerving. VPN solves that, but adds some lag.
Therefore, I would put the public IP to a routing firewall, that supports VPN. You might even have one already.
A client on the outside forms a VPN connection to the router. Then the client connects to the file-sharing device via the VPN tunnel. Some routers do offer a "connect a USB drive and I'll share it with SMB" feature. If not, then a NAS. The size (and price and speed) is up to you.
A client inside, on the LAN, connects to the file-sharing device directly.