diff options
| author | Tristan Mahé <gled@remote-shell.net> | 2018-06-26 13:45:47 -0700 | 
|---|---|---|
| committer | Tristan Mahé <gled@remote-shell.net> | 2018-06-26 13:45:47 -0700 | 
| commit | cb21bf5fc225899ad6cf87f5ab0253506cf0531e (patch) | |
| tree | dd879958e76a0e72a11dbea099092a49787ddfec /lib | |
| parent | fc012491a5174139b06cc9945e6dc4bc687ebdb7 (diff) | |
| download | pleroma-cb21bf5fc225899ad6cf87f5ab0253506cf0531e.tar.gz pleroma-cb21bf5fc225899ad6cf87f5ab0253506cf0531e.zip | |
filter exif data #187
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pleroma/upload.ex | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex index 43df0d418..dee281f5b 100644 --- a/lib/pleroma/upload.ex +++ b/lib/pleroma/upload.ex @@ -80,6 +80,14 @@ defmodule Pleroma.Upload do      }    end +  def strip_exif_data(file) do +    settings = Application.get_env(:pleroma, Pleroma.Upload) +    @do_strip = Keyword.fetch!(settings, :strip_exif) +    if @do_strip == true do +	Mogrify.open(file) |> Mogrify.custom("strip") |> Mogrify.save(in_place: true)	 +    end +  end +    def upload_path do      settings = Application.get_env(:pleroma, Pleroma.Upload)      Keyword.fetch!(settings, :uploads) | 
