Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Save Post File issue
#1
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
Reply


Messages In This Thread
Save Post File issue - by Blanca80 - 03-14-2022, 04:14 PM
RE: Save Post File issue - by Alexandre Machado - 03-16-2022, 12:55 AM
RE: Save Post File issue - by Blanca80 - 03-16-2022, 07:58 AM
RE: Save Post File issue - by Blanca80 - 03-16-2022, 04:19 PM
RE: Save Post File issue - by Alexandre Machado - 03-17-2022, 03:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)