Class MediaAutoConfiguration

java.lang.Object
com.onec.ui.media.MediaAutoConfiguration

@AutoConfiguration(before=org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration.class) @ConditionalOnWebApplication(type=SERVLET) @EnableConfigurationProperties(MediaProperties.class) @ConditionalOnProperty(prefix="onec.media", name="enabled", havingValue="true", matchIfMissing=true) public class MediaAutoConfiguration extends Object
Wires the /api/media binary-upload endpoint and its default filesystem storage. Both the endpoint and the storage are gated on onec.media.enabled (default true) and a servlet web application. The FilesystemMediaStorage default backs off the moment an application or connector contributes its own MediaStorage bean (e.g. S3-compatible), so storage is swapped by addition, not by editing the framework.

Runs before Spring's MultipartAutoConfiguration so its MultipartConfigElement (sized from onec.media.max-file-size) wins over the 1 MB container default that would otherwise reject realistic image uploads before they reach the controller.

  • Constructor Details

    • MediaAutoConfiguration

      public MediaAutoConfiguration()
  • Method Details