Add OpenAPI spec for PleromaAPI.AccountController
This commit is contained in:
parent
da550be066
commit
6802dc28ba
7 changed files with 284 additions and 44 deletions
|
|
@ -134,7 +134,7 @@ defmodule Pleroma.Upload do
|
|||
end
|
||||
end
|
||||
|
||||
defp prepare_upload(%{"img" => "data:image/" <> image_data}, opts) do
|
||||
defp prepare_upload(%{img: "data:image/" <> image_data}, opts) do
|
||||
parsed = Regex.named_captures(~r/(?<filetype>jpeg|png|gif);base64,(?<data>.*)/, image_data)
|
||||
data = Base.decode64!(parsed["data"], ignore: :whitespace)
|
||||
hash = String.downcase(Base.encode16(:crypto.hash(:sha256, data)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue