- This topic has 1 reply, 1 voice, and was last updated 1 year, 7 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Hello.
I’m creating a rest api, I can now send and receive requests, but I’m having difficulty receiving and sending files, I’m trying the following way but it doesn’t work, I’m getting an Invalid header size error.
I’m trying to send a file via Postman with binary body.
[kbmMW_Rest(‘method:post, path:saveFile’)]
function saveFile([kbmMW_Rest(‘value:body’)] aFile: TStream):string;
This would be the way I am trying to receive the file.
What would the correct way be?
tkx a lot.
I managed to solve it, following the instructions Kim gave me and following the blog
I was able to receive files via multipart form-data and via stream.
ForceDirectories(‘.\receivedfiles’);
sFileName:=’.\receivedfiles\file.png’;
RequestStream.SaveToFile(sFileName);
thank you very much