2021-12-11 23:54:20 +00:00
|
|
|
import Config
|
2021-11-18 22:21:08 +00:00
|
|
|
|
|
|
|
# where do you want to store files? supports local storage, s3-compatible services, and more
|
|
|
|
# see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider
|
|
|
|
config :waffle,
|
|
|
|
storage: Waffle.Storage.Local,
|
2022-09-12 04:34:14 +00:00
|
|
|
# or {:system, "ASSET_HOST"}
|
|
|
|
asset_host: "/"
|
2021-11-18 22:21:08 +00:00
|
|
|
|
|
|
|
image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"]
|
|
|
|
|
2022-09-12 04:34:14 +00:00
|
|
|
all_allowed_media_types =
|
|
|
|
image_media_types ++
|
|
|
|
[
|
|
|
|
"text/plain",
|
|
|
|
# doc
|
|
|
|
"text/csv",
|
|
|
|
"application/pdf",
|
|
|
|
"application/rtf",
|
|
|
|
"application/msword",
|
|
|
|
"application/vnd.ms-excel",
|
|
|
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
|
|
"application/vnd.oasis.opendocument.presentation",
|
|
|
|
"application/vnd.oasis.opendocument.spreadsheet",
|
|
|
|
"application/vnd.oasis.opendocument.text",
|
|
|
|
"application/epub+zip",
|
|
|
|
# archives
|
|
|
|
"application/x-tar",
|
|
|
|
"application/x-bzip",
|
|
|
|
"application/x-bzip2",
|
|
|
|
"application/gzip",
|
|
|
|
"application/zip",
|
|
|
|
"application/rar",
|
|
|
|
"application/x-7z-compressed",
|
|
|
|
# audio
|
|
|
|
"audio/mpeg",
|
|
|
|
"audio/ogg",
|
|
|
|
"audio/wav",
|
|
|
|
"audio/webm",
|
|
|
|
"audio/opus",
|
|
|
|
# video
|
|
|
|
"video/mp4",
|
|
|
|
"video/mpeg",
|
|
|
|
"video/ogg",
|
|
|
|
"video/webm"
|
|
|
|
]
|
2021-11-18 22:21:08 +00:00
|
|
|
|
2022-04-30 09:20:07 +00:00
|
|
|
config :bonfire_files, image_media_types: image_media_types
|
|
|
|
config :bonfire_files, all_allowed_media_types: all_allowed_media_types
|
2022-04-28 08:42:31 +00:00
|
|
|
|
2022-04-30 09:20:07 +00:00
|
|
|
config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types
|
|
|
|
config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types
|
2022-09-12 04:34:14 +00:00
|
|
|
|
|
|
|
config :bonfire_files, Bonfire.Files.DocumentUploader,
|
|
|
|
allowed_media_types: all_allowed_media_types
|