alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.TwitterAPI.UserView
alias Pleroma.Web.{OStatus, CommonAPI}
+ alias Pleroma.Web.MediaProxy
import Ecto.Query
@instance Application.get_env(:pleroma, :instance)
{:ok, object} = ActivityPub.upload(file)
url = List.first(object.data["url"])
- href = url["href"]
+ href = url["href"] |> MediaProxy.url()
type = url["mediaType"]
case format do