 
   @versions [:original, :poster]
 
+  @acl :public_read
+
   # To add a thumbnail version:
   # @versions [:original, :thumb]
 

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


    ~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
