# If you use Docker, you may want to assign UID/GID manually.
# UID=1000
# GID=1000
+
+# Maximum allowed character count
+# MAX_TOOT_CHARS=500
+
+# Maximum number of pinned posts
+# MAX_PINNED_TOOTS=5
+
+# Maximum allowed bio characters
+# MAX_BIO_CHARS=500
+
+# Maximim number of profile fields allowed
+# MAX_PROFILE_FIELDS=4
+
+# Maximum allowed display name characters
+# MAX_DISPLAY_NAME_CHARS=30
+
+# Maximum image and video upload sizes
+# Units are in bytes
+# 1048576 bytes equals 1 megabyte
+# MAX_IMAGE_SIZE=8388608
+# MAX_VIDEO_SIZE=41943040
- # Maximum length of audio uploads in seconds
- # MAX_AUDIO_LENGTH=60
-
# LDAP authentication (optional)
# LDAP_ENABLED=true
# LDAP_HOST=localhost
IMAGE_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif', '.webp'].freeze
VIDEO_FILE_EXTENSIONS = ['.webm', '.mp4', '.m4v', '.mov'].freeze
- AUDIO_FILE_EXTENSIONS = ['.mp3', '.m4a', '.wav', '.ogg'].freeze
- AUDIO_FILE_EXTENSIONS = ['.ogg', '.oga', '.mp3', '.wav', '.flac', '.opus'].freeze
++ AUDIO_FILE_EXTENSIONS = ['.ogg', '.oga', '.mp3', '.m4a', '.wav', '.flac', '.opus'].freeze
IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze
- VIDEO_MIME_TYPES = ['video/webm', 'video/mp4', 'video/quicktime'].freeze
+ VIDEO_MIME_TYPES = ['video/webm', 'video/mp4', 'video/quicktime', 'video/ogg'].freeze
VIDEO_CONVERTIBLE_MIME_TYPES = ['video/webm', 'video/quicktime'].freeze
- AUDIO_MIME_TYPES = ['audio/mpeg', 'audio/mp4', 'audio/vnd.wav', 'audio/wav', 'audio/x-wav', 'audio/x-wave', 'audio/ogg',].freeze
- AUDIO_MIME_TYPES = ['audio/wave', 'audio/wav', 'audio/x-wav', 'audio/x-pn-wave', 'audio/ogg', 'audio/mpeg', 'audio/mp3', 'audio/webm', 'audio/flac'].freeze
++ AUDIO_MIME_TYPES = ['audio/wave', 'audio/wav', 'audio/x-wav', 'audio/x-wave', 'audio/vdn.wav', 'audio/x-pn-wave', 'audio/ogg', 'audio/mpeg', 'audio/mp3', 'audio/mp4', 'audio/webm', 'audio/flac'].freeze
BLURHASH_OPTIONS = {
x_comp: 4,
},
}.freeze
- IMAGE_LIMIT = 8.megabytes
- VIDEO_LIMIT = 40.megabytes
+ VIDEO_CONVERTED_STYLES = {
+ small: VIDEO_STYLES[:small],
+ original: VIDEO_FORMAT,
+ }.freeze
+
+ IMAGE_LIMIT = (ENV['MAX_IMAGE_SIZE'] || 8.megabytes).to_i
+ VIDEO_LIMIT = (ENV['MAX_VIDEO_SIZE'] || 40.megabytes).to_i
belongs_to :account, inverse_of: :media_attachments, optional: true
belongs_to :status, inverse_of: :media_attachments, optional: true
class REST::InstanceSerializer < ActiveModel::Serializer
include RoutingHelper
- attributes :uri, :title, :description, :email,
+ attributes :uri, :title, :short_description, :description, :email,
- :version, :urls, :stats, :thumbnail,
+ :version, :urls, :stats, :thumbnail, :max_toot_chars, :poll_limits,
- :languages, :registrations
+ :languages, :registrations, :approval_required
has_one :contact_account, serializer: REST::AccountSerializer