What can I do with photos/videos via the API?

api

(Jonny Arnold) #1

Hello there!

I am currently looking at using Discourse’s backend with a customised JavaScript frontend. I am hoping to use Discourse API to do this, but I can’t seem to find a definitive answer to a few questions on the API documentation.

Here goes:

  1. Can users upload images via the API when posting a comment?
  2. Does rich media (YouTube links, etc.) get pulled through when using the API?

Any clarification (or documentation!) you can give me would be beneficial.

Thanks!
Jonny


(Kane York) #2

Look at how the normal client does it with your browser’s Network dev tools.

That’s a property of the post cooking & processing, so yes. Even non-JS bots can do that.


(cpk) #3

I have been able to reverse engineer most of the API, but Images are tricky to trace. Has anyone implemented file uploads to the Discourse API via JS?