projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e95d958
)
upload: strip exif data before finalizing the file path
author
William Pitcock
<nenolod@dereferenced.org>
Mon, 27 Aug 2018 23:36:30 +0000
(23:36 +0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Mon, 27 Aug 2018 23:36:30 +0000
(23:36 +0000)
lib/pleroma/upload.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/upload.ex
b/lib/pleroma/upload.ex
index e0cb545b0b9adba94b6ceaf574bf5a5cc4375992..eaff8fbf36812856c28108bd9c0f720552ea56e7 100644
(file)
--- a/
lib/pleroma/upload.ex
+++ b/
lib/pleroma/upload.ex
@@
-9,6
+9,8
@@
defmodule Pleroma.Upload do
upload_folder = get_upload_path(uuid, should_dedupe)
url_path = get_url(name, uuid, should_dedupe)
+ strip_exif_data(content_type, file.path)
+
File.mkdir_p!(upload_folder)
result_file = Path.join(upload_folder, name)
@@
-18,8
+20,6
@@
defmodule Pleroma.Upload do
File.cp!(file.path, result_file)
end
- strip_exif_data(content_type, result_file)
-
%{
"type" => "Document",
"url" => [