I believe its all the same use case its a question how the custom configuration is specified which identifiesExternalResource could handle.
On Mon, Feb 24, 2025 at 6:45 PM Adam Taft <a...@adamtaft.com> wrote: > It seems that the Config Body property is being used for the content of a > configuration, whereas the Config File property is a file reference that > contains the configuration. Two different use cases? The configuration > being specified either directly in the property value vs. via the contents > of a configuration file. > > See this line for their uses: > > https://github.com/apache/nifi/blob/96eea40601948dbe30d4df7b5f7a667cb997d591/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/IdentifyMimeType.java#L186 > > The property descriptions say that Config Body and Config File cannot be > both configured at the same time. Reading the line above, it seems more > correct that if both are configured, that Config Body takes precedence. > > /Adam > > On Mon, Feb 24, 2025 at 10:15 AM Dan S <dsti...@gmail.com> wrote: > > > IdentifyMimeType defines two property descriptors MIME_CONFIG_BODY and > > MIME_CONFIG_FILE where either one is used for obtaining a MIME > > configuration. Couldn't these be combined into one property descriptor > > using external resources which would also allow for loading the > > configuration from a URL? > > e.g. > > public static final PropertyDescriptor MIME_CONFIG_CONTENT = new > > PropertyDescriptor.Builder() > > .name("Mime config content) > > .description("A URL or file path to the Mime config file or > the > > actual Mime config file content") > > .required(true) > > .identifiesExternalResource(ResourceCardinality.SINGLE, > > ResourceType.FILE, ResourceType.URL, ResourceType.TEXT) > > .addValidator(StandardValidators.NON_BLANK_VALIDATOR) > > .build(); > > >