Allow both stdin and stdout
This commit is contained in:
parent
ddbddc08fc
commit
afa03ca8e2
@ -14,7 +14,7 @@ defmodule Pleroma.Helpers.MediaHelper do
|
|||||||
convert - -resize '#{max_width}x#{max_height}>' -quality #{quality} -
|
convert - -resize '#{max_width}x#{max_height}>' -quality #{quality} -
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pid = Port.open({:spawn, cmd}, [:use_stdio, :in, :stream, :exit_status, :binary])
|
pid = Port.open({:spawn, cmd}, [:use_stdio, :stream, :exit_status, :binary])
|
||||||
{:ok, env} = url |> Pleroma.Web.MediaProxy.url() |> Pleroma.HTTP.get()
|
{:ok, env} = url |> Pleroma.Web.MediaProxy.url() |> Pleroma.HTTP.get()
|
||||||
image = env.body
|
image = env.body
|
||||||
Port.command(pid, image)
|
Port.command(pid, image)
|
||||||
|
Loading…
Reference in New Issue
Block a user