summaryrefslogtreecommitdiffstats
path: root/src/routes/model.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-24 13:13:58 +0000
committerSanto Cariotti <santo@dcariotti.me>2022-09-24 13:13:58 +0000
commit98afa8460939c8df3c02e6e9f6c902afe75f3ea2 (patch)
tree2e823269137f6a421b9d9d9550e5c06354aa2c51 /src/routes/model.rs
parentbeed53dde27c17b4105c7168285d1deca137e493 (diff)
Add `sla` and `octet-stream` as available extensions
Actually they're the application content types for .stl and .obj files
Diffstat (limited to 'src/routes/model.rs')
-rw-r--r--src/routes/model.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/routes/model.rs b/src/routes/model.rs
index 7d10061..b510ade 100644
--- a/src/routes/model.rs
+++ b/src/routes/model.rs
@@ -147,7 +147,18 @@ async fn upload_model_file(
return Err(AppError::Unauthorized);
}
- let allowed_extensions = vec!["stl", "obj", "png", "jpg", "jpeg", "gif", "webp", "blend"];
+ let allowed_extensions = vec![
+ "stl",
+ "obj",
+ "png",
+ "jpg",
+ "jpeg",
+ "gif",
+ "webp",
+ "blend",
+ "octet-stream",
+ "sla",
+ ];
match upload(multipart, allowed_extensions, None).await {
Ok(saved_file) => {