From: Teemu A. <te...@io...> - 2004-04-26 17:13:07
|
Hi, I modified the OpenInteract.pm function send_static_file() in OI 1.60 to allow sending a filehandle instead of passing a filename or returning file contents. I have a system that generates a temporary file with a filehandle and when the temporary filehandle object goes out of scope, the temporary file is destroyed. This was a problem if I wanted to send the contents of the file to the client. I had two options: 1. Modifying $R->{page}{content_type} and returning the file contents from the OI Handler. This is a problem, I don't want to load an entire file in the memory. 2. Modifying $R->{page}{content_type} and using $R->{page}{send_file} for returning contents of a file. This only allows the filename and since I'm using a temporary filehandle object that goes out of scope, I had to modify OpenInteract.pm to allow returning filehandles instead of filenames. Is there a better method? I think OpenInteract was not scalable enough in this kind of fundamental issue. Is this different in OI2? -- Sincerely, Teemu Arina Ionstream Oy / Dicole Komeetankuja 4 A 02210 Espoo FINLAND Tel: +358-(0)50 - 555 7636 http://www.dicole.org |