Keep in mind that the file polling port will handle the files in different ways depending upon a number of factors.
IS determines the content type of files via the file polling port in 2 ways:
If the port is configured with a content type then every file processed from the monitoring directory will be assumed to be of that type. The content handler for that type will be used for all files regardless of extension.
If a content type is not configured, then the extension of the filename is used to determine the content type. The lib/mime.types file is used for the mapping.
Different content type handlers put different variables of different types into the pipeline when the top-level service is called. So if the service is to handle different content types as determined by the file extension, then the steps will need to look for the right variables.
My personal preference is to establish directories and file polling ports for each type of file, which is usually associated with one particular integration partner. Having a single drop box can be useful in some situations but you’ll want to weigh that administrative convenience against the complexity of code and the risk of mishandling a file.