X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fupload%2Ffilter%2Fdedupe.ex;h=81ddd9b295a6f6fb4fa8873b2f375950655d5cec;hb=074fa790ba6282772cd8b2d40926032228d17c81;hp=28091a627229c418c8f0528bfa5117209b13723d;hpb=02d3dc6869f388388ea744ea4ee3b54279d55e86;p=akkoma diff --git a/lib/pleroma/upload/filter/dedupe.ex b/lib/pleroma/upload/filter/dedupe.ex index 28091a627..81ddd9b29 100644 --- a/lib/pleroma/upload/filter/dedupe.ex +++ b/lib/pleroma/upload/filter/dedupe.ex @@ -1,7 +1,7 @@ defmodule Pleroma.Upload.Filter.Dedupe do @behaviour Pleroma.Upload.Filter - def filter(upload = %Pleroma.Upload{name: name, tempfile: path}) do + def filter(upload = %Pleroma.Upload{name: name, tempfile: _path}) do extension = String.split(name, ".") |> List.last() shasum = :crypto.hash(:sha256, File.read!(upload.tempfile)) |> Base.encode16(case: :lower) filename = shasum <> "." <> extension