feat: simple, but not stupid, uploader for IPFS

fix: format fix with credo
This commit is contained in:
Claudio Maradonna 2022-04-07 18:25:02 +02:00
commit fa2a6d5d6b
No known key found for this signature in database
GPG key ID: 0CBA58694C5680D9
5 changed files with 107 additions and 2 deletions

View file

@ -82,6 +82,10 @@ config :ex_aws, :s3,
# region: "us-east-1", # may be required for Amazon AWS
scheme: "https://"
config :pleroma, Pleroma.Uploaders.IPFS,
post_gateway_url: nil,
get_gateway_url: nil
config :pleroma, :emoji,
shortcode_globs: ["/emoji/custom/**/*.png"],
pack_extensions: [".png", ".gif"],

View file

@ -136,6 +136,30 @@ config :pleroma, :config_description, [
}
]
},
%{
group: :pleroma,
key: Pleroma.Uploaders.IPFS,
type: :group,
description: "IPFS uploader-related settings",
children: [
%{
key: :get_gateway_url,
type: :string,
description: "GET Gateway URL",
suggestions: [
"get_gateway_url"
]
},
%{
key: :post_gateway_url,
type: :string,
description: "POST Gateway URL",
suggestions: [
"post_gateway_url"
]
}
]
},
%{
group: :pleroma,
key: Pleroma.Uploaders.S3,

View file

@ -58,6 +58,10 @@ config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
# https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects
config :phoenix, :plug_init_mode, :runtime
config :pleroma, Pleroma.Uploaders.IPFS,
post_gateway_url: nil,
get_gateway_url: nil
if File.exists?("./config/dev.secret.exs") do
import_config "dev.secret.exs"
else