Richard,

How are you determining the filename?

I looked back in a piece of code, and I am doing something like:

my $fileup=$Request->{FileUpload}{upload_file};
my $browserfile=$fileup->{BrowserFile};
my $filehandle=$fileup->{FileHandle};
my $tempfile=$fileup->{TempFile};

I believe that $tempfile holds the name of the file as is sitting on the drive after the upload.

I also have:

PerlSetVar FileUploadTemp 1

Set in httpd.conf

Tim

Richard Curtis wrote:

OK, I am sorry for posting stupid questions, but I have been at this all night and got no-where.

Right, I have a page which allows upload of files.
The user uploads several files, and I cache the filename of the file they uploaded using the session.
So, the session contains a list of filenames.

I am now passing this array of filenames to a backend module.
The files are already uploaded to a tmp directory by now.

In the backend module, I move the files from the temporary directory, to the proper storage location.
When I call :
move_file("$srcDir$file","$dstDir$file"),

I get the following error :

Utilities:move_file : cannot find file /home/myapp/data/tmp/test_user/Fh=GLOB(0x86983bc)

I know the reason behind the error - it is because the filename I stored in the session is really a handle to the uploaded file.

The question is, how can I simply get back the filename rather than the filehandle....

I am stumped on this one.

Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to