description: "A Pleroma instance, an alternative fediverse server",
limit: 5000,
upload_limit: 16_000_000,
+ avatar_upload_limit: 2_000_000,
+ background_upload_limit: 4_000_000,
+ banner_upload_limit: 4_000_000,
registrations_open: true,
federating: true,
allow_relay: true,
|> Enum.reverse()
end
- def upload(file) do
- data = Upload.store(file, Application.get_env(:pleroma, :instance)[:dedupe_media])
- Repo.insert(%Object{data: data})
+ def upload(file, size_limit \\ nil) do
+ with data <-
+ Upload.store(file, Application.get_env(:pleroma, :instance)[:dedupe_media], size_limit),
+ false <- is_nil(data) do
+ Repo.insert(%Object{data: data})
+ end
end
def user_data_from_user_object(data) do