Project

General

Profile

Saving an uploaded file by a cgi-routine written in C

Added by mike_from_hamburg over 12 years ago

Hi,
i have a problem with saving an uploaded file by calling a cgi-routine in C.

Server
------
I am using Ubuntu V.8.04 in a VM
I am using lighttpd/1.4.19

Client
------
I am using Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0

Uploading a file (even very large files) works fine. Saving files using a php-script works fine. Saving an uploaded file to another location by a cgi-routine in C does not work yet. I am forced to use C, no chance to change this requirement!
The uploaded, temporary files appear in the directory I configered in the lighttpd.conf file. I can see them in the file browser (Nautilus) during the upload of very large files. After the upload has finisched, a cgi written in C is called, everything is fine so far. My C-cgi-routine looks for all files in the upload directory and copies them to another location. The complete uploaded file seems not to exist in the directory at this moment, when the cgi-function is called. Where is it? Is it already deleted by the lighttpd? If it is deleted, can I disable deleting uploaded files by lighttpd?

The cgi works. When I copy a file to the upload directory and afterwards call the cgi manually, the file will be copied to the location I expected it to appear.

I would be very grateful for any help!
Merry Christmas, Michael

lighttpd_forum.zip (4.15 KB) lighttpd_forum.zip lighttpd.conf cgi-function and the html-file I am using