fix: MAX_FILE_SIZE_MB → EMAIL_MAX_UPLOAD_SIZE_MB in supplier invoice upload v2.2.15
This commit is contained in:
parent
3978dae692
commit
aa7b0894af
@ -2003,7 +2003,7 @@ async def upload_supplier_invoice(file: UploadFile = File(...)):
|
||||
|
||||
try:
|
||||
# Validate file size while saving
|
||||
max_size = settings.MAX_FILE_SIZE_MB * 1024 * 1024
|
||||
max_size = settings.EMAIL_MAX_UPLOAD_SIZE_MB * 1024 * 1024
|
||||
total_size = 0
|
||||
|
||||
with open(temp_path, "wb") as buffer:
|
||||
@ -2013,7 +2013,7 @@ async def upload_supplier_invoice(file: UploadFile = File(...)):
|
||||
temp_path.unlink(missing_ok=True)
|
||||
raise HTTPException(
|
||||
status_code=413,
|
||||
detail=f"Fil for stor (max {settings.MAX_FILE_SIZE_MB}MB)"
|
||||
detail=f"Fil for stor (max {settings.EMAIL_MAX_UPLOAD_SIZE_MB}MB)"
|
||||
)
|
||||
buffer.write(chunk)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user