   def filename(:poster, _params) do
     :poster
   end
-  def filename(version, {_, %{file_name: file_name}}) do
-    Logger.warn "version: #{inspect version}"
+  def filename(_version, {_, %{file_name: file_name}}) do
     String.replace(file_name, ~r(\.[^/.]+$), "")
   end
-  def filename(version, %{file_name: file_name} = params) do
-    Logger.warn "params: #{inspect params}"
+  def filename(_version, %{file_name: file_name}) do
     file_name
   end
 

    # # "/priv/uploads"
  end
  def storage_dir(scope) do
    "/priv/static/uploads/#{scope.message_id}"
  end

  # Provide a default URL if there hasn't been a file uploaded

    ~w(.jpg .jpeg .gif .png .txt .text .doc .pdf .wav .mp3 .mp4 .mov .m4a .xls) |> Enum.member?(Path.extname(file.file_name))
  end

  def transform(:poster, {_, %{type: "video" <> _}}) do
    {:ffmpeg, fn(input, output) ->
      "-i #{input} -f image2 -ss 00:00:01.00 -vframes 1 -vf scale=-1:200 #{output}" end, :jpg}
  end
