forked from AkkomaGang/akkoma
upload: strip exif data before finalizing the file path
This commit is contained in:
parent
e95d958b52
commit
86c007ddd2
1 changed files with 2 additions and 2 deletions
|
@ -9,6 +9,8 @@ def store(%Plug.Upload{} = file, should_dedupe) do
|
||||||
upload_folder = get_upload_path(uuid, should_dedupe)
|
upload_folder = get_upload_path(uuid, should_dedupe)
|
||||||
url_path = get_url(name, uuid, should_dedupe)
|
url_path = get_url(name, uuid, should_dedupe)
|
||||||
|
|
||||||
|
strip_exif_data(content_type, file.path)
|
||||||
|
|
||||||
File.mkdir_p!(upload_folder)
|
File.mkdir_p!(upload_folder)
|
||||||
result_file = Path.join(upload_folder, name)
|
result_file = Path.join(upload_folder, name)
|
||||||
|
|
||||||
|
@ -18,8 +20,6 @@ def store(%Plug.Upload{} = file, should_dedupe) do
|
||||||
File.cp!(file.path, result_file)
|
File.cp!(file.path, result_file)
|
||||||
end
|
end
|
||||||
|
|
||||||
strip_exif_data(content_type, result_file)
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
"type" => "Document",
|
"type" => "Document",
|
||||||
"url" => [
|
"url" => [
|
||||||
|
|
Loading…
Reference in a new issue