summaryrefslogtreecommitdiffstats
path: root/src/routes/model.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-12 12:31:16 +0000
committerSanto Cariotti <santo@dcariotti.me>2022-09-12 12:31:16 +0000
commitea16fc1b2d36b5ccafbd380612f8b1c7d575800b (patch)
tree3598e64bcb7e7dcd9f5b5e972c4073444b0c6653 /src/routes/model.rs
parent8b7bd0a73f92c06e98902093e7ef5f12f974f882 (diff)
Allow images for model files
Diffstat (limited to 'src/routes/model.rs')
-rw-r--r--src/routes/model.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/model.rs b/src/routes/model.rs
index 30429f7..748f596 100644
--- a/src/routes/model.rs
+++ b/src/routes/model.rs
@@ -82,7 +82,9 @@ async fn upload_model_file(
return Err(AppError::Unauthorized);
}
- match upload(multipart, vec!["stl"]).await {
+ let allowed_extensions = vec!["stl", "obj", "png", "jpg", "jpeg", "gif", "webp", "blend"];
+
+ match upload(multipart, allowed_extensions).await {
Ok(saved_file) => {
let model_file = ModelUpload::create(ModelUpload::new(saved_file, model_id)).await?;