I have had this problem (upload button not functioning) for a few days with my Ubuntu 22.04/Firefox installation. I discovered it is because of the snap Firefox version. The only solution I found is to download Firefox source file directly and use this installation of Firefox.
What I did te recover all my settings:
edit the profile file ~/.mozilla/firefox/profiles.ini,
create a /home/silvain/.local/share/applications/firefox.desktop launcher,
set the profile as the previous snap profile opening aboutrofiles from this new firefox