Uploading previously reset the mask, history and viewport. It now goes through the
same replaceSource path that adopting a result uses, so only the source pixels
change and the painted mask, undo/redo history and current view survive.
If the new image has a different size the mask cannot be kept, so the upload falls
back to a fresh load and shows a notice instead of failing.