Normalize upload filename extensions
Sometimes uploaded files may have a different filename extension compared to the "usual" one. An example of this is images from Twitter have :large
, :orig
, etc. appended to the end of the filename. This may cause the webserver to not provide the proper mimetype for the given file or in some cases cause Elixir to throw a Plug.Static.InvalidPathError