Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85806484
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1021 B
Referenced Files
None
Subscribers
None
View Options
diff --git a/lib/pleroma/uploaders/mdii.ex b/lib/pleroma/uploaders/mdii.ex
index f21a7e1e2..0f68b0805 100644
--- a/lib/pleroma/uploaders/mdii.ex
+++ b/lib/pleroma/uploaders/mdii.ex
@@ -1,24 +1,24 @@
defmodule Pleroma.Uploaders.Mdii do
@behaviour Pleroma.Uploaders.Uploader
@httpoison Application.get_env(:pleroma, :httpoison)
def put_file(name, uuid, path, content_type, _should_dedupe) do
settings = Application.get_env(:pleroma, Pleroma.Uploaders.Mdii)
host_name = Keyword.fetch!(settings, :host_name)
{:ok, file_data} = File.read(path)
File.rm!(path)
extension = Regex.replace(~r/^image\//, content_type, "")
query = "https://#{host_name}/mdii.cgi?#{extension}"
with {:ok, %{status_code: 200, body: body}} <-
- @httpoison.get(url, file_data) do
+ @httpoison.post(query, file_data) do
remote_file_name = body
public_url = "https://#{host_name}/#{remote_file_name}.#{extension}"
{:ok, public_url}
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Oct 13, 1:08 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1786543
Default Alt Text
(1021 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment