Tags:
create new tag
view all tags
Question

  • TWiki version: 20001201
  • Web server: Apache for Win32 1.3.19
  • Server OS: WinNT Server 4.0

I had a fairly consistent problem with the file upload / attach feature of TWiki. I tried IE 5 and 5.5 and Navigator 4.X but both failed on uploading a file. The oops script reported that the file was empty.

It appeared that the issue was the upload script which uses the -s file size test on the var $tmpFilename. It seemed that the file size was always reported as null. I tried to use the vars $filePath and $fileName but I got the same result. So then I implemented the stat function as per the following code:

# if( ! -s "$tmpFilename" ){

($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($filePath);

if(!($size > 0)) {

It appears to have resolved the problem that I was experiencing. Is the above code acceptable? Are there any issues with security?

Thanks

-- TWikiGuest - 28 Mar 2001

Answer

The are some changes in the TWikiAlphaRelease that are similar. Are you in a position to try this on your machine?

-- JohnTalintyre - 28 Mar 2001

Not really. We are new to TWiki and I do not want to introduce any glitches which might curb user acceptance. Thanks though. As well, I modified the sendEmail routine in wiki.pm to work with Net::SMTP since my system does not have a command line mailer. I thought I read in the TWiki docs that TWiki supported Net::SMTP if the SMTPMAILHOST variable was added to the TWikiPreferences. I tried that, but it did not work. I probably missed something though...

-- TWikiGuest - 28 Mar 2001

I had no trouble uploading files to Twiki 20001201 on Windows NT 4.0sp6a using ActivePerl 5.6 build 623 with Apache 1.3.17

-- DavidLeBlanc - 01 Apr 2001

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2002-01-29 - TWikiAdmin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.