Here is an example of updating the firmware via the WEB interface:
In the menu we select “Device” -> “Device Maintenance“, the first tab will open “Software Upgrade“.
In her opposite “File” click the button “Browse” and select on the computer previously downloaded and unpacked from the archive firmware, in our case it is “A5800_5820X-CMW520-R1809P11.bin”.
Put a tick opposite “Reboot after the upgrade is finished” and click at the bottom of the button “Apply“.
The firmware on the switch will be updated and it will reboot. I note that it takes a long time, more than 3 minutes.

The settings after updating the firmware remained the same, that is, they were not reset.