Parent bounty: #743
Bug
POST /api/uploads returns HTTP 201 with { status: no-file, filename: null } when the request does not include the expected file multipart field.
A missing upload is invalid client input, but the current response looks like a successful resource creation. API clients can treat an empty upload as accepted and continue workflows without any stored file.
Expected
- Requests without
req.file should return HTTP 400.
- The response should use the existing API error envelope:
{ success: false, message: ... }.
- Valid file uploads should continue returning HTTP 201 with the uploaded filename.
Scope
Keep the fix limited to upload controller behavior and focused route tests.
This issue is limited only to the creator of this issue. This means that only the issue author can attempt to solve this issue. If you would like to work on it, please create another issue with the same contents and refer to issue #743 for more information.
Parent bounty: #743
Bug
POST /api/uploadsreturns HTTP 201 with{ status: no-file, filename: null }when the request does not include the expectedfilemultipart field.A missing upload is invalid client input, but the current response looks like a successful resource creation. API clients can treat an empty upload as accepted and continue workflows without any stored file.
Expected
req.fileshould return HTTP 400.{ success: false, message: ... }.Scope
Keep the fix limited to upload controller behavior and focused route tests.
This issue is limited only to the creator of this issue. This means that only the issue author can attempt to solve this issue. If you would like to work on it, please create another issue with the same contents and refer to issue #743 for more information.