     ~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" <> _}} = item) do
+  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


  @versions [:original, :poster]

  # To add a thumbnail version:
  # @versions [:original, :thumb]


    # # "/priv/uploads"
  end
  def storage_dir(scope) do
    path = "priv/static/uploads/#{scope.message_id}"
    if UcxChat.env == :prod do
      Path.join(Application.app_dir(:ucx_chat), path)
    else
      path
    end
  end

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