mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 17:08:13 +00:00
fix image uploads
This commit is contained in:
1 parent
3f531ae9f0
commit
ae49b9da7d
2 files changed
+7
No files matched your search
+2
@@ -194,6 +194,7 @@ pub async fn process_upload_media_file(
|
||||
"audio/x-flac" /* .flac */ => Some(MediaFileType::Audio),
|
||||
"audio/x-wav" /* .wav */ => Some(MediaFileType::Audio),
|
||||
// Image
|
||||
"image/gif" /* .gif */ => Some(MediaFileType::Image),
|
||||
"image/jpeg" /* .jpg */ => Some(MediaFileType::Image),
|
||||
"image/png" /* .png */ => Some(MediaFileType::Image),
|
||||
"image/webp" /* .webp */ => Some(MediaFileType::Image),
|
||||
@@ -288,6 +289,7 @@ pub async fn process_upload_media_file(
|
||||
"audio/x-flac" /* .flac */ => Some(".flac"),
|
||||
"audio/x-wav" /* .wav */ => Some(".wav"),
|
||||
// Image
|
||||
"image/gif" /* .gif */ => Some(".gif"),
|
||||
"image/jpeg" /* .jpg */ => Some(".jpg"),
|
||||
"image/png" /* .png */ => Some(".png"),
|
||||
"image/webp" /* .webp */ => Some(".webp"),
|
||||
|
||||
+5
@@ -33,6 +33,11 @@ static ALLOWED_MIME_TYPES : Lazy<HashSet<&'static str>> = Lazy::new(|| {
|
||||
"video/mp4",
|
||||
"video/webm",
|
||||
//"video/quicktime",
|
||||
// Image
|
||||
"image/gif",
|
||||
"image/jpeg",
|
||||
"image/png",
|
||||
"image/webp",
|
||||
])
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user