File upload
Next to the chat input textbox, there should be an upload icon (a paper clip would be standard). Clicking should open a file prompt, allowing the user to select an attachment, most likely an image. This file would then be POSTed to a special address; the response from that POST request would include the link to the attachment which would be used as the message body itself.
Points for discussion:
-
Should upload happen to the proxy itself? For public facing instances, this is easy since it's running an HTTPS server already. But it's a hack.
-
Should the proxy manage upload, but not serve it? The proxy would receive the file (regardless of whether it's a public instance), and then from there, it is the proxy's job to figure out what to do. On a public instance, it might
cp
the file to a special directory in the webroot. On a private instance, it might forward it to a public pastebin type service. -
Should the proxy be totally disconnected? Upload would be a purely client-issue, but then who hosts it?
-
Should we use some mix of the above?
-
Should we use an upload modal or just straight to the file prompt from clicking?See Florrie's comments.