JMeterProperty fileName = getProperty(FILE_NAME);
JMeterProperty paramName = getProperty(FILE_FIELD);
JMeterProperty mimeType = getProperty(MIMETYPE);
HTTPFileArg oldStyleFile = new HTTPFileArg(fileName, paramName, mimeType);
HTTPFileArgs fileArgs = getHTTPFileArgs();
HTTPFileArgs allFileArgs = new HTTPFileArgs();
if(oldStyleFile.isNotEmpty()) { // OK, we have an old-style file definition
allFileArgs.addHTTPFileArg(oldStyleFile); // save it
// Now deal with any additional file arguments
if(fileArgs != null) {
HTTPFileArg[] infiles = fileArgs.asArray();
for (int i = 0; i < infiles.length; i++){
allFileArgs.addHTTPFileArg(infiles[i]);
}
}
} else {
if(fileArgs != null) { // for new test plans that don't have FILE/PARAM/MIME properties
allFileArgs = fileArgs;