You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, creating a new job in the system requires a multipart/form-data request, even when no files are being uploaded. If an application/json request is sent without the multipart form, it fails. This is an unnecessary limitation as users should be able to create jobs by simply sending a regular JSON payload with the necessary information, without having to include multipart data unless file uploads are involved. This affects users who are creating jobs programmatically and do not need to upload files, causing avoidable failures and extra complexity.
Steps to Reproduce
Attempt to create a new job via the API. {{baseUrl}}/api/v1/jobs/{{queueName}}
Send a POST request with the Content-Type: application/json and a JSON payload containing all the necessary job details.
Observe that the request fails unless multipart/form-data is used, even though no file is being uploaded.
Acceptance Criteria
Job creation should be allowed with application/json requests when no file uploads are involved.
The system should only require multipart/form-data when files are being sent as part of the job creation request.
The API should successfully handle job creation when only a JSON payload is provided with the necessary job details.
Ensure backward compatibility, so that multipart/form-data can still be used when files need to be uploaded.
dotCMS Version
Tested on trunk // Docker
Proposed Objective
Quality Assurance
Proposed Priority
Priority 2 - Important
Quality Assurance Notes & Workarounds
Ensure job creation works correctly with both multipart/form-data and application/json depending on whether files are included in the request.
Test creating jobs with and without file uploads to confirm that the appropriate request type works in each scenario.
Until this issue is resolved, users need to continue using multipart/form-data for job creation, even if they are not uploading files.
The text was updated successfully, but these errors were encountered:
Parent Issue
Related to #29480
Problem Statement
Currently, creating a new job in the system requires a multipart/form-data request, even when no files are being uploaded. If an application/json request is sent without the multipart form, it fails. This is an unnecessary limitation as users should be able to create jobs by simply sending a regular JSON payload with the necessary information, without having to include multipart data unless file uploads are involved. This affects users who are creating jobs programmatically and do not need to upload files, causing avoidable failures and extra complexity.
Steps to Reproduce
Attempt to create a new job via the API.
{{baseUrl}}/api/v1/jobs/{{queueName}}
Send a POST request with the Content-Type: application/json and a JSON payload containing all the necessary job details.
Observe that the request fails unless multipart/form-data is used, even though no file is being uploaded.
Acceptance Criteria
dotCMS Version
Tested on trunk // Docker
Proposed Objective
Quality Assurance
Proposed Priority
Priority 2 - Important
Quality Assurance Notes & Workarounds
The text was updated successfully, but these errors were encountered: