2

I need some help accepting file uploads on an ISAPI in Delphi XE2. In Delphi 2007 I use Shiv's TMsMultipartParser and it works 100%. Trying to use this in XE2 doenst work. From what I can tell the contents length is read incorrectly and then the buffer's lenght is set incorrectly.

My testes between 2007 and XE2 shows that the length on XE2 is 3 bytes larger for the same file. Unfortunately I dont know how to fix this, nor can I find anything else on how to accept the files from the upload form and save them.

Any help of code samples would help.

Thank you

Paul
  • 157
  • 1
  • 2
  • 14
  • 3 bytes? Sounds like an UTF-8 BOM (Byte Order Mark, though for UTF-8 that is a misnomer). D2007 does not support Unicode, DXE2 does. Quite probably the code compilted with DXE2 is adding the utf-8 bom somewhere because of receiving utf-8 contents. – Marjan Venema Mar 13 '13 at 17:38

1 Answers1

3

I used exactly this multipart parser on my Delphi 2007 project but I needed to adjust it when it came to the unicodification. I guess there could be your problem.

Anyway at least my Delphi 2010 comes with the unit ReqMulti.pas so try to include that somewhere in the project and you should have a multipart parser registered.

If that doesn't work for you I'll post my adjusted parser.

mrabat
  • 802
  • 7
  • 15