[pmwiki-users] Updating PmWiki with external applications
stevecrisp at gmail.com
stevecrisp at gmail.com
Sun Jun 15 14:50:35 CDT 2008
Thank you kind Sir, just the prod I needed, I've done it now. FYI the
curl command to upload any file type allowed by PmWiki is:
curl -F n=Main.WikiSandbox -F action=postupload -F
uploadfile=@/c/times.txt http://localhost/pmwiki.php/Main/WikiSandbox
Obviously alter the wiki page name and file name to suit. If you also
add -F upname=alternative-file-name.txt you can alter the filename
within PmWiki.
Great stuff :-)
-Steve.
2008/6/15 Patrick R. Michaud <pmichaud at pobox.com>:
> 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