Only scan the upload folder if it has not been done before (see #6134)