In dev mode, the my_app/priv dir is symlinked to to my_app/_build/dev/..... In prod it is copied to that dir. It’s actually controlled by the build_embedded key in the project/0 function in mix.exs.
This is because Elixir runs your compiled code which is stored in the my_app/_build directory. Since priv is build artifact, it is located there as well.
I think its better to consider the :code.priv_dir/1 to be part of the build process, not part of the runtime environment. And therefore I’d suggest considering an alternative location for your uploads.






















