Question
Im using
FreeBSD 5.3 to host a TWiki for playing purposes, but also to learn about setup, operation, administration, yadda yadda.
When trying to upload a file I receive the following message:
"Either you did not specify a file name, or the file you are trying to upload c:\random file.pdf has no content. You may not upload an empty file."
Im certain its some form of permissions issue, however, I cant quite figure out where or what doesnt have permission.
I have given my /twiki/pub directory full read/write access, also my /tmp and /usr/tmp directories, and chowned all files and folders within my TWiki directory to the www user, yet it still doesnt seem to be able to upload a file, or save it, or whatever.
I have no serious errors or warnings in configure.
Does anyone have any suggestions as to other things I can try, or other folders I should have permissions on to get uploads working?
Environment
--
TWikiGuest - 24 Nov 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
it sounds to me more like a client problem. did you try with an other browser? what about uploading a file where the filename does not contain spaces?
--
MarioFrasca - 27 Nov 2006
Can you verify the TWiki version you are using? There was a bug of zero byte attachments in 4.0.2,
Bugs:Item2390
.
--
PeterThoeny - 27 Nov 2006
Ive created myself a user
Thanks for the suggestions. Im using the latest and greatest 4.00.05, but I havnt tried a different browser. Personally I dont think it is the issue.
While doing some perl coding of my own Im having the same issues, where uploaded files dont appear to have any content.
What Ive found is when reading from STDIN I receive the multipart data containing the contents of the file(s), so the content is being sent to the server, its just a matter of getting hold of it from where ever its ending up!
However, if I create an instance of the CGI module it seems to wipe this out, since I would assume the CGI module is taking over the input from STDIN for its own use.
The CGI module doesnt seem to be doing the job, so I dunno what to do from here :/
I had a look at the document you linked but Im not sure how it can help. I'll look into it a bit more.
--
TomStorey - 29 Nov 2006
I just tried an upload using Firefox 1.0.7 and got the same results. "No content uploaded". I have also tried uploading files with no spaces in the file name.
--
TomStorey - 29 Nov 2006
HOORAY I FIGURED IT OUT
I did some more googling around and came accross a code example, which I cant quite figure out what is different to my original code, but I wrote a new test script for uploading files for my own code and it actually works!
So I went browsing around the TWiki code and in the UI.pm module changed line 34 from "use CGI qw( :cgi -any );" to "use CGI qw( :standard :cgi -any );" and hey presto. Uploads now work
I havnt quite noticed any adverse effects from this yet, but I havnt done a heck of a lot yet. I shall let you all know how it goes
--
TomStorey - 29 Nov 2006
--
TomStorey - 29 Nov 2006