问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/15385808/delphi-xe-isapi-webbroker-file-upload