I am trying to pass a parameter with base encoded data to a curl request. It complains about the argument list too long because the base encoded string is too long. Based on the responses from other posts, I tried to store the content in a file and tried passing the file as a parameter. There, I am getting an error: The file is corrupted or format is unsupported
Here is what both my requests looks like
curl -v -i POST "https://contoso.azure.com/formrecognizer/documentModels/prebuilt-idDocument:analyze?api-version=2022-06-30-preview" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key: <key>" --data "{'base64Source': '<base64encoded_data>'}"
curl -v -i POST "https://contoso.azure.com/formrecognizer/documentModels/prebuilt-idDocument:analyze?api-version=2022-06-30-preview" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key: <key>" --data "{'base64Source': '@file.txt'}"
I put the base64 encoded data in the file as is - file_screenshot
Any help is appreciated.