I have upgraded mime to 2.0.3, and getting below error.
RUN mix compile
—> Running in 0e90b797e89a1
ERROR! the application :mime has a different value set for key :types during runtime compared to compile time. Since this application environment entry was marked as compile time, this difference can lead to different behaviour than expected:
- Compile time value was not set
- Runtime value was set to: %{“application/pdf” => [“pdf”], “application/vnd.mytest.v1+json” => [“api_v1_json”]}
To fix this error, you might:
-
Make the runtime value match the compile time one
-
Recompile your project. If the misconfigured application is a dependency, you may need to run “mix deps.compile mime --force”
-
Alternatively, you can disable this check. If you are using releases, you can set :validate_compile_env to false in your release configuration. If you are using Mix to start your system, you can pass the --no-validate-compile-env flag
Below is the config.ex file
config.ex
config :mime, :types, %{
“application/vnd.mytest.v1+json” => [“api_v1_json”],
“application/pdf” => [“pdf”]
}