implement update_action and change the context menu's upload to update

Also the `QFileInfo(path).fileName()` pattern appears multiple times, we can make it a utility function like `getBaseName`.