0

i can't find the documentation anywhere for how to actually use the Conduit API. I'm able to create a task using some really weird methods, but once i create the ticket, i can't find any documentation about how to actually upload a file anywhere.

i tried looking at:

https://secure.phabricator.com/conduit/method/maniphest.createtask/

and i get so confused on how this actually works. what actually is this?

David T.
  • 22,301
  • 23
  • 71
  • 123
  • How do you mean to add a file? Maniphest tasks don't have an attachment field to add files too. – CEPA Aug 08 '14 at 21:34
  • @CEPA ah. is it just not possible then? – David T. Aug 09 '14 at 00:27
  • It is certainly possible. There is an "Upload File" button on the text entry boxes for both the original Task details, and the comments. But you are right, the Conduit API is not well documented for this type of thing. – JSON Aug 14 '14 at 14:39

1 Answers1

3

I think you need to upload the File separately through the file.upload conduit method, then use an {Fnnn} reference in the Task or Comment text to link to it. I presume when file.upload says it returns a GUID, it means a PHID, so you'll also need to use file.info to get the id to use in place of the nnn in the reference text.

JSON
  • 4,487
  • 22
  • 26
  • last time i tried it, i couldn't actually upload an image as base64 encoding. like the content was too large to feed in :'( – David T. Aug 14 '14 at 18:38
  • You can find discussion on configuring file upload limits (including server limits which prevent large requests) in the documentation here: https://secure.phabricator.com/book/phabricator/article/configuring_file_upload_limits/ – Evan Priestley Aug 23 '14 at 19:32
  • if you have a problem with the size (error message: "Request-URI Too Long"), then change method to POST instead of GET – poerror Jul 02 '17 at 10:56