On Sun, 15 Jun 2008, [EMAIL PROTECTED] wrote:
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.
Hi Steve,
Do you think you could put the above on some cookbook page, it sounds like
a useful thing to know!
Best regards,
Christian
Great stuff :-)
-Steve.
2008/6/15 Patrick R. Michaud <[EMAIL PROTECTED]>:
On Sun, Jun 15, 2008 at 03:12:27PM +0100, [EMAIL PROTECTED] 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
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users