Tags:
create new tag
view all tags

SID-01698: programmatic upload

Status: Unanswered Unanswered TWiki version: 5.0.1 Perl version: 5.8.8
Category: CategoryAPI Server OS: CentOS 5.4 (final), kernel 2.6.18 Last update: 10 years ago

I'm trying to programmatically upload a file to a topic using http post multipart/form-data. I get no errors from TWiki but files are not uploaded (even if the attach table is filled in if I ask for that feature). Looking at the filesystem I see no directory nor file is created. I think file and directory permissions are ok, 755 on apache:apache. Am I missing something? I enetered all the fields required by the upload cgi script. Is there a way to get extra debug info?

TWiki-5.0.1, Sun, 10 Oct 2010, build 19570, Plugin API version 1.3

-- Marco Molinaro - 2013-05-08

Discussion and Answer

Not sure, but things to check:

  • Turn off {CryptToken}{Enable} in configure to see if this causes the issue. I do not recommend to turn this off in a public TWiki. Depends on security needs if it is an internal TWiki
  • What kind of {LoginManager} do you use? If template login causes issues try apache login (using different twiki/bin & apache config, but same data, pub, lib, etc)
  • Do debug, add print STDERR "something\n"; debug statements into lib/TWiki/UI/Upload.pm and watch the output the the apache error log.
Once you find a solution how about writing a blog about this on TWiki.org? See BlogIdeas.

-- Peter Thoeny - 2013-05-08

Hi again, first of all, I'm trying to access programmatically the TWiki from a Java app. Maybe I didn't point out this very clearly in the initial support request. The calls to TWiki are done all through HTTP-POST. Said that:

  • I don't think the problem is on the crypttoken because I make other-than-upload calls in an identical fashion and I'm able to send the crypttoken input correctly. Moreover, I tried to remove that input and I do get an error from the TWiki. So I think that is not my problem;
  • regarding the login, I'm using java.net.Authenticator and, same as above, I get no refused connections with, e.g., save or edit POSTs. Also the upload call returns no error on connection, nor I see apache log issues on that;
  • I didn't tried yet the last suggested solution, I'll report as soon as I'll test it.
Hope this gives a better context to my support request, meanwhile Thank you for the support!

-- Marco Molinaro - 2013-05-14

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- Peter Thoeny - 2015-12-03

      Change status to:
ALERT! 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.
SupportForm
Status Unanswered
Title programmatic upload
SupportCategory CategoryAPI
TWiki version 5.0.1
Server OS CentOS 5.4 (final), kernel 2.6.18
Web server Apache/2.2.3
Perl version 5.8.8
Browser & version using Java URLconnection (Java 1.6)
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2015-12-03 - PeterThoeny
 
  • 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.