fpweb: file upload not recognized
Original Reporter info from Mantis: anieden@gmx.de
-
Reporter name: Axel Niedenhoff
Original Reporter info from Mantis: anieden@gmx.de
- Reporter name: Axel Niedenhoff
Description:
I have tried the CGI version of the fileupload example in fpweb (through Lazarus). However, fpweb seems not to notice when I upload a file. Request.Files.Count is 0, even for a request actually containing a file. I also tried accessing Request.Files[0] to see whether it was just the count that was wrong, but I got an exception, so it seems that the uploaded file just isn’t processed as a file.
I have checked uploading a file to a Ruby CGI script, just to see whether there is something wrong with my Apache installation, but it works fine with Ruby.
Steps to reproduce:
* Compile the CGI version of the fpweb fileupload example (Ubuntu 10.10, with the standard Lazarus and Free Pascal version from the Ubuntu repository). You might need to make changes to the path of uploaded files (line 49 in webmodule.pas.
* Deploy to an Apache web server (executable + HTML file).
* Call the interface in a web browser and upload a file. The file will not become visible in the interface.
* Adding some code to output Request.Files.Count (in the HandleUploadedFiles) procedure will reveal that that property is 0 when you upload a file.
Mantis conversion info:
- Mantis ID: 17779
- OS: Ubuntu Linux
- OS Build: 10.10
- Build: 2010-03-06
- Platform: PC (32 bit)
- Version: 2.3 (SVN)
- Target version: 1.0.0