[pmwiki-users] Updating PmWiki with external applications

Patrick R. Michaud pmichaud at pobox.com
Sun Jun 15 10:40:59 CDT 2008


On Sun, Jun 15, 2008 at 03:12:27PM +0100, stevecrisp at gmail.com wrote:
> All,
> 
> I've looked at http://www.pmwiki.org/wiki/PmWiki/EditingAPI and can
> post normal Wiki pages fine from external applications e.g. using curl
> to post to Main.WikiSandbox I'd do:
> 
> curl -d "?n=Main.WikiSandbox&text=TestingWiki&action=edit&post=1&author=AuthorName"
> http://localhost/pmwiki.php/Main/WikiSandbox
> 
> My question is how would I do the same with uploading files, utilising
> PmWiki's standard upload form e.g.
> http://localhost/pmwiki.php/Main/WikiSandbox?action=upload.  I've
> tried and tried and can not do it with curl.  Looking at the HTML from
> PmWiki's upload form page I think it might be because the input line
> below doesn't have a 'name' tag.

No, that's not it.  To do an upload you want to make sure to
have action=postupload.  Your submission also needs to do a
file-based upload, with a name of 'uploadfile' (I have no idea
how to do this in curl).

Hope this helps,

Pm



More information about the pmwiki-users mailing list