API UploadField: move replaceFile to the front end config

Bug: A warning should not overwrite the config it wants to warn about.

See #2920