03-14-2022, 04:14 PM
Hello everybody,
I have implemented the iw.content.xml execute function like the deploy in PostDataDemo and it works fine. The problem is when i save the file that i posted for example like this
1. catch the file. (only 1 file)
xFile := THttpFile(aRequest.Files[0]);
2. save the file directly on the server.
xFile.SaveToFile(FTempName);
That "new" posted file has added the following headers/ foot:
-----------------------8da05d7825e0cb7
Content-Disposition: form-data; name="file"; filename="STR7F6F_14_03_2022_16_27_02.TXT"
Content-Type: application/octet-stream
.
.
.
-----------------------8da05d7825e0cb7--
In some types of files this ends in their corruption, like excel ones.
If i load this into filestream and then save it is the same.
the only thing that occurs to me is to load into a streamreader object, read the lines, and discard the boundaries and the header ones. But is there an easiest way to do that?
In resume how do i can avoid the boundaries and header lines in the httpfile before save?
Thank you very much
kind regards
Blanca
I have implemented the iw.content.xml execute function like the deploy in PostDataDemo and it works fine. The problem is when i save the file that i posted for example like this
1. catch the file. (only 1 file)
xFile := THttpFile(aRequest.Files[0]);
2. save the file directly on the server.
xFile.SaveToFile(FTempName);
That "new" posted file has added the following headers/ foot:
-----------------------8da05d7825e0cb7
Content-Disposition: form-data; name="file"; filename="STR7F6F_14_03_2022_16_27_02.TXT"
Content-Type: application/octet-stream
.
.
.
-----------------------8da05d7825e0cb7--
In some types of files this ends in their corruption, like excel ones.
If i load this into filestream and then save it is the same.
the only thing that occurs to me is to load into a streamreader object, read the lines, and discard the boundaries and the header ones. But is there an easiest way to do that?
In resume how do i can avoid the boundaries and header lines in the httpfile before save?
Thank you very much
kind regards
Blanca