Delphi XE ISAPI WebBroker文件上传 [英] Delphi XE ISAPI WebBroker file upload
问题描述
我需要一些帮助,在Delphi XE2中的ISAPI上接受文件上传。在Delphi 2007中,我使用Shiv的TMsMultipartParser,它工作100%。试图在XE2 doenst工作中使用它。从我可以告诉的内容长度读取不正确,然后缓冲区的长度设置不正确。
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.
我和2007年XE2之间的睾丸显示XE2上的长度是3个字节对于相同的文件较大。不幸的是,我不知道如何解决这个问题,也没有找到任何关于如何从上传表单接受文件并保存它们的内容。
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.
任何代码示例的帮助
谢谢
推荐答案
我用完了这个multipart解析器在我的Delphi 2007项目中,但是在需要调整它的时候,我需要调整它。我想可能会有你的问题。
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.
无论如何,至少我的Delphi 2010附带了ReqMulti.pas单元,所以尽量把它包括在项目的某个地方,你应该有一个注册的multipart解析器。
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.
这篇关于Delphi XE ISAPI WebBroker文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!