diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 12:31:16 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 12:31:16 +0000 |
| commit | ea16fc1b2d36b5ccafbd380612f8b1c7d575800b (patch) | |
| tree | 3598e64bcb7e7dcd9f5b5e972c4073444b0c6653 /src | |
| parent | 8b7bd0a73f92c06e98902093e7ef5f12f974f882 (diff) | |
Allow images for model files
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/model.rs | 4 |
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?; |
