Fix java.lang.IllegalArgumentException for UploadPlugin