A plug-in that would upload a video (which a user had attached to a Discourse posting) to my company’s YouTube channel

AI-generated summary

Feronti is looking for a plug-in to upload videos attached to Discourse postings to their company’s YouTube channel. They want to automate the process to avoid users having to manually upload videos to YouTube and then share the link in their Discourse post. The desired functionality includes programmatically uploading the video to YouTube, removing the attachment from the Discourse post, and replacing it with the YouTube link.

Feronti mentions that some users may post large videos (over 10GB) and notes that removing attachments from Discourse posts is currently not feasible through the interface.

RGJ suggests a theme component that might achieve the desired functionality, but Feronti finds that it is currently broken and unmaintained.

I read this…

Presumably that works.

My use case

  1. Because I don’t want my users to need to bother taking the extra steps required to upload a video to YouTube and then, copy and paste that YouTube link into their Discourse posting, and
  2. because I want videos they attach to their Discourse posting to be uploaded to my company’s YouTube channel,

Functionality I would like

  1. Assuming a user had attached a video file to a posting they had created on Discourse,
  2. the file would be programmatically uploaded to my company’s YouTube channel (presumably using the YouTube Data API), and then
  3. the video (which the user had attached to his Discourse posting) would be programmatically removed and replaced with a link to the YouTube file is displayed as a thumbnail.

Extra information 1

I realize that I could write a Python script that would upload videos located in /var/discourse/shared/standalone/uploads/default/ to my company’s YouTube account.

However, I’d rather not figure out how to remove the attachment from the user’s Discourse posting and concomitantly insert the link to the YouTube file into the user’s Discourse posting.

Extra information 2

In case you are curious, I’m imagining that some users will likely post videos which are larger than 10GB (ten gigabytes).

Extra information 3

I read…

Extra information 4

I also read…

There’s this theme component which I think does exactly what you need,
although I understand it’s currently unmaintained

1 Like

Apparently it is broken and unmaintained.