Unify object representation.
[akkoma] / lib / pleroma / upload.ex
index 3567c6c8893388c76e8a90d4c3a2136375ac6785..c41617c68e80fe4130f5d24a2990e7c93f216622 100644 (file)
@@ -9,7 +9,7 @@ defmodule Pleroma.Upload do
     File.cp!(file.path, result_file)
 
     # fix content type on some image uploads
-    content_type = if file.content_type == "application/octet-stream" do
+    content_type = if file.content_type in [nil, "application/octet-stream"] do
       get_content_type(file.path)
     else
       file.content_type