Forum Discussion
richie
2 years agoCommunity Hero
Hi,
Just an update. There's a small defect in ReadyAPI when you're adding attachment files to a REST request that steers you in the wrong direction. It's only that i noticed when i compared the instructions to what was actually happening when i noticed the disparity.
When you click to add attach files to a REST request, the attached file gets mapped to a "file" QUERY parm. The value that populates this field needs tlo be the filename of the file attachment. I.e. "letter.docx".
So! Click to add a file, browse to the relevant file, the last step you are offered if you wish to cache the file. Once this dialogue is closed, there is a row in the attachment tab that is autopopulated with the full path to the file (in Name column), Content-Type, Size, there's Type column and a ContentID column. All these are auto populated.
The ContentID field was autopopulated with the filename....i.e. letter.docx. HOWEVER, this causes your requests to fail. The ContentID field needs to contain the value of the QUERY parm, it's mapped to (i.e. in my case "file"). It doesnt need the name of the file because the Name column includes the full path to the attachment file.
Ok. That's it. Just wanted to highlight a Something to watch out for!
Cheers!
Rich
Just an update. There's a small defect in ReadyAPI when you're adding attachment files to a REST request that steers you in the wrong direction. It's only that i noticed when i compared the instructions to what was actually happening when i noticed the disparity.
When you click to add attach files to a REST request, the attached file gets mapped to a "file" QUERY parm. The value that populates this field needs tlo be the filename of the file attachment. I.e. "letter.docx".
So! Click to add a file, browse to the relevant file, the last step you are offered if you wish to cache the file. Once this dialogue is closed, there is a row in the attachment tab that is autopopulated with the full path to the file (in Name column), Content-Type, Size, there's Type column and a ContentID column. All these are auto populated.
The ContentID field was autopopulated with the filename....i.e. letter.docx. HOWEVER, this causes your requests to fail. The ContentID field needs to contain the value of the QUERY parm, it's mapped to (i.e. in my case "file"). It doesnt need the name of the file because the Name column includes the full path to the attachment file.
Ok. That's it. Just wanted to highlight a Something to watch out for!
Cheers!
Rich
Related Content
- 10 months ago
- 5 years ago
Recent Discussions
- 5 hours ago
- 17 days ago