I am learning how to use the Word API to replace text content in Word. But it never succeeded, please help me see where the problem lies?
Refer to this document:
my curl is :
curl --location --request PUT 'https://api.aspose.cloud/v4.0/words/online/put/replaceText?destFileName=Temp/Sample02.docx' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiI..........' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Accept: */*' \
--header 'Host: api.aspose.cloud' \
--header 'Connection: keep-alive' \
--header 'Content-Type: multipart/form-data; boundary=--------------------------455069586334080097189993' \
--header 'Cookie: AWSALB=u5rsK9tPPRX2hOg+Af0J9HoZ.........' \
--form 'Document=@"/Users/jeckun/Downloads/Sample.docx"' \
--form 'ReplaceText="{\"OldValue\":\"文件\",\"NewValue\":\"新闻\"}"'
Request:
–b7df03d6-4fa4-411b-ba77-344edc8a677d
Content-Type: application/json
Content-Disposition: inline; name=Model
{
“Matches”: 2,
“DocumentLink”: {
“Href”: “Temp/Sample02.docx”,
“Rel”: “self”
},
“RequestId”: “Root=1-656d6d2d-3eca6de3654ef1504bf59ef9”
}
–b7df03d6-4fa4-411b-ba77-344edc8a677d
Content-Disposition: attachment; name=Document; filename=“Temp/Sample02.docx”
Issue:
My problem is that the target file Temp/Sample02.docx could not be found in the storage.