Well,
I've found the issue, and this was a bit shocking but that's what I
get for reading source..
File::Temp->tempfile uses the current directory unless you tell it otherwise.
So I changed line 611 of Uploader.pm to read this
my ($tmp_fh, $tmp_filename) = tempfile('CGIuploaderXXXXX', UNLINK => 1
, DIR => File::Spec->tmpdir() );
I"ll be submitting a patch for this next week.
That brings me to another issue. CGI::Uploader uses File::MMagic to
detect the mime type and thus the extension of a file.
Well, it does a horrible job with excel files for one, mistaking them
for msword files.
Mark, I"d like to modify Uploader to either get the mime type from the
query object -OR- I may just muck with the section that uses
File::MMagic, maybe change up the order of which tests get run first
to figure it out.
Do you have any gotcha's or suggestions I should look at to keep this
backwards compatible, or do you think it should be changed at all.
Thanks folks.
Jeff.
On 12/13/05, Jeff MacDonald <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to use CGI::Uploader and it's telling me the following
>
> Error executing run mode 'upload_media_manager': Error in tempfile()
> using CGIuploaderXXXXX: Parent directory (.) is not writable
>
> Fairenough.. that makes sense. However I don't want (.) aka my cgi-bin
> to be writable. I can't think of a good reason why I would :)
>
> The man page does not recommend a way to set the temporary directory,
> I was wondering if any of you blokes know a way that I could tell it
> to use /tmp or /usr/tmp for example.
>
> Jeff.
>
> --
> Jeff MacDonald
> http://www.halifaxbudolife.ca
> http://www.nintai.ca
>
--
Jeff MacDonald
http://www.halifaxbudolife.ca
http://www.nintai.ca
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]