diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 13:30:19 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-12 13:30:19 +0000 |
| commit | af3f5430a0b0f1834228b28fd89848959512e718 (patch) | |
| tree | 27e843c147b92bf09893012f323ddaf54f5eb0a5 /src/routes/model.rs | |
| parent | 385102a5763f667d53a9d8ed2052ccb8c791bc91 (diff) | |
Use configuration for environment variables
Diffstat (limited to 'src/routes/model.rs')
| -rw-r--r-- | src/routes/model.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/routes/model.rs b/src/routes/model.rs index d1ac197..34e896d 100644 --- a/src/routes/model.rs +++ b/src/routes/model.rs @@ -1,4 +1,3 @@ -use crate::config::MAX_UPLOAD_FILE_SIZE; use crate::errors::AppError; use crate::files::upload; use crate::models::{ @@ -69,7 +68,7 @@ async fn get_model(Path(model_id): Path<i32>) -> Result<Json<ModelUser>, AppErro async fn upload_model_file( claims: Claims, Path(model_id): Path<i32>, - ContentLengthLimit(multipart): ContentLengthLimit<Multipart, { MAX_UPLOAD_FILE_SIZE }>, + ContentLengthLimit(multipart): ContentLengthLimit<Multipart, { 1024 * 1024 }>, ) -> Result<Json<ModelUpload>, AppError> { let model = match Model::find_by_id(model_id).await { Ok(model) => model, |
