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
Hello @InfoMdle 👋, I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!
The error you're encountering is due to the incorrect format of the allRequestParams field in your request. The allRequestParams field should be a Map<String, String>, but it seems like it's being sent as a string instead of a map.
To fix this, you need to ensure that the allRequestParams is correctly formatted as a map in your request. Here's how you can adjust your curl command:
In this example, replace customKey1, customKey2, and customKey3 with your actual custom keys, and customValue1, customValue2, and customValue3 with the corresponding values. This format should correctly represent the map structure expected by the API [1].
Installation Method
Docker
The Problem
When trying to use update-metadata api with swagger and try to add Custom Parameters in allRequestParams i always get a 400 error message.
Request generated in swagger
curl -X 'POST' \ 'https://removed-for-security' \ -H 'accept: */*' \ -H 'Content-Type: multipart/form-data' \ -F 'trapped=' \ -F 'modificationDate=' \ -F 'keywords=' \ -F 'author=' \ -F 'creator=' \ -F 'subject=' \ -F 'creationDate=' \ -F 'fileInput=@image2024-11-27-103615_OCR (1).pdf;type=application/pdf' \ -F 'producer=' \ -F 'allRequestParams={ "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }' \ -F 'deleteAll=false' \ -F 'title=''
Or
curl -X 'POST' \ 'https://pdf.manufacturedelephemere.fr/api/v1/misc/update-metadata' \ -H 'accept: */*' \ -H 'Content-Type: multipart/form-data' \ -F 'trapped=' \ -F 'modificationDate=' \ -F 'keywords=' \ -F 'author=' \ -F 'creator=' \ -F 'subject=' \ -F 'creationDate=' \ -F 'fileInput=@image2024-11-27-103615_OCR (1).pdf;type=application/pdf' \ -F 'producer=' \ -F 'allRequestParams={ "customKey1": "MyCustomMetadataKey1", "customValue1": "MyCustomMetadataValue1", "customKey2": "MyCustomMetadataKey2", "customValue2": "MyCustomMetadataValue2" }' \ -F 'deleteAll=false' \ -F 'title='
Version of Stirling-PDF
0.34.0
Last Working Version of Stirling-PDF
No response
Page Where the Problem Occurred
http://localhost/swagger-ui/index.html#/Misc/metadata
Docker Configuration
No response
Relevant Log Output
Additional Information
No response
Browsers Affected
No response
No Duplicate of the Issue
The text was updated successfully, but these errors were encountered: