This is just a feature I was thinking about that would be nice to have as things like discord, slack and irccloud have this build in.
There are several ways I see how this can work depending on how complete we want to make this.
Option 1. would be pretty cool but expands the scope of the lounge and comes with various issues regarding privacy (people might run the lounge on their home network) and hosting capacity (image urls might be reshared and get really popular taking down the user's lounge machine).
Option 2. would probably be the most trivial one to implement if it is simply anonymous uploads. This leaves people without the option to delete whatever they uploaded which would complicate the implementation somewhat and will add additional settings.
Option 3. is the most flexible of the three however will make things complicated for the user.
As far as the UI/UX goes in the most simple form it would simply be an upload icon where the destination is determined on the filetype and that on success returns the url in the input textarea.
A nice UX touch could be to offer to upload user input to gist/pastebin when someone writes a very long piece of text. This is something that irccloud does and allows for very easy code sharing.
So, we do serve images from the lounge, as we cache preview images now, so we can use that.
I would suggest:
Having the 2 of these would be the best of both worlds. We should start off with just 1 and eventually do 2.
Similarly, we should probably start off with only supporting uploading images as that's simplest and takes least security thoughts.
The gist idea is nice (I miss that from irccloud) but also brings in a few issues with making sure that we don't accidentally create XSS.
As far as the UI/UX goes in the most simple form it would simply be an upload icon where the destination is determined on the filetype and that on success returns the url in the input textarea.
Also, drag/drop onto chat would be nice.
I loved how it worked in irccloud. Image in clipboard paste in textinput on chatclient and it posts a link to the image.
yeah doing 1 first and then 2 eventually makes the most sense.
Also, drag/drop onto chat would be nice.
Yeah there are a few things people are used to I guess.
I agree with pretty much everything that was said here.
The only implementation detail I would add, and it doesn't have to be that way at first try, is that eventually I think TL should "simply" define an upload file API, and built-in upload to our internal storage would simply be a built-in package that dogfoods that API.
Then as said anyone can come up with packages for imgur or whatnot that consume that same API.
Re: UX, also agreed with all: upload button, drag-and-drop, copy/paste. Not all have to come with first implementation, we can start with simple button and add the others later if that makes it easier to code/review/merge.
Surprised we didn't have an issue for this already, thanks for opening it!
Added in #2552, disabled by default and will require further UX work. But the actual ability to upload files and link them is there.
Most helpful comment
So, we do serve images from the lounge, as we cache preview images now, so we can use that.
I would suggest:
Having the 2 of these would be the best of both worlds. We should start off with just 1 and eventually do 2.
Similarly, we should probably start off with only supporting uploading images as that's simplest and takes least security thoughts.
The gist idea is nice (I miss that from irccloud) but also brings in a few issues with making sure that we don't accidentally create XSS.
Also, drag/drop onto chat would be nice.