Option to include audio uploads to posts as playable links

(Goke Pelemo) #1

I think it is a great idea to give forum owners the option to either include audio (e.g. mp3) uploads as HTML hyperlinks as done today, or just include the raw links in the post so that onebox can pick them up and make them playable.

Today forum users have to manually strip the anchor tags and paste the link in a new line by itself to make it playable by viewers. I think the default behavior should be to have it embed a player (as per onebox) and then a clickable link at the bottom of the player with the file size for downloading.

Just a suggestion, open to critique.

Great work on Discourse by the way. Amazing!

(Michael Downey) #2

I’d presume this behavior would include other open audio formats, too. Seems smart.

(Goke Pelemo) #3

Yes, I’d imagine so. ‘mp3’ files just came top of mind. Perhaps I should edit the post.

(Kane York) #4

I’m pretty sure that the default browser players have an option to get the content URL, no?


https://meta.discourse.org/raw/16896/4 (open in new tab)

(Goke Pelemo) #5

@riking Yes, but I think its a better experience if forum users who are not as savvy have the ability to just click play and watch it there.

(Jeff Atwood) #6




versus… what exactly? That’s how oneboxing works. I’m not clear what you are requesting beyond this.

(Goke Pelemo) #7

@codinghorror: So, when the upload of an audio file completes using the upload button, the link is put in an anchor tag (html hyperlink better still) and as a result, oneboxing does not kick in. A link just shows up that gives the viewer an opportunity to download the file.

I guess I’m hoping there’s a way to upload the .mp3 (or other media file), and have it both oneboxed and directly linked to so viewers can play the file before deciding if they want to download.

(Goke Pelemo) #8

@codinghorror I would test here, but mp3 uploads aren’t allowed.

(Jeff Atwood) #9

Are you allowing users to upload large media files? Our default install caps all uploads at 2mb 3mb which is fine for Images and Excel docs and PDFs, but not much of an mp3 or video. The usual case is to upload large 10mb to 100+mb media files on hosting services designed for hosting media (e.g. SoundCloud, YouTube) and link to them.

(Goke Pelemo) #10

@codinghorror Yes, I already raised that limit on the forum and discourse.conf in the container. I’m creating a lifestyle/culture forum for a geographical demographic and I think giving the opportunity to upload media files directly to the forum will be very fitting for the purpose, they’ll be sitting in S3 anyway.

Are there any other concerns I should be taking into consideration?

Thanks Jeff.

(Jeff Atwood) #11

I don’t think we can fit this in for V1, but for future releases that are maybe two months out, sure. In the meantime you might want to have a topic explaining how to onebox by editing the post to be just the URL to the uploaded file, e.g. from this:

hello-world.txt (12 Bytes)

To this:


Any pull requests welcome of course.