srain icon indicating copy to clipboard operation
srain copied to clipboard

Proposal: Support for picture/file uploading

Open VOID001 opened this issue 7 years ago • 2 comments

This is a very basic proposal for a new function.

I'd like to work on srain for the support of image/file uploading. And below are functions need to be supported:

Functions need to be supported

  • Upload pictures/file from disk
  • Upload pictures/file from Clipboard
  • Preview of the picture uploaded
  • Upload progress( Is it supported in current IRC protocol for srain ?)

VOID001 avatar Jul 31 '18 04:07 VOID001

This issue is part of #79.

The picture/file upload function should be implement via plugin(any script language supported by libpeas, for now, python2/3, javascript, lua is supported). So we should finish #79 before dealing with this issue.

An important things is that IRC is a PLAIN TEXT protocol, DCC can send file but it require Client-To-Client connection -- which is not suitable for channel.

According to the leagcy upload plugin. We can post the specified image/file to public pastebin and return an URL to achieve the purpose of sending image/file. The key point is what interfaces should be exposed by Srain.

In my option, Srain should offer such interfaces:

  • When a plugin register, add a button on the plugin pane. for example:
  • Allow plugin access input text view of window (a.k.a. SuiWindow->input_text_view)

I think these are enough.

For the function you mentioned:

Upload pictures/file from disk Upload pictures/file from Clipboard

Plugin can create a GtkFileChooser to do this.

Preview of the picture uploaded

This is stuff of SuiMessage, any subclass of SuiMessage will try to fetch the content of URLs in message. I am working on this part.

Upload progress( Is it supported in current IRC protocol for srain ?)

Plugin has abalitiy to change UI, I think it is not impossible, but not a high priority task.

SilverRainZ avatar Jul 31 '18 05:07 SilverRainZ

  1. It is stuck for a long time
  2. Related to #79

So assign to myself.

SilverRainZ avatar Sep 29 '18 03:09 SilverRainZ