Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for image (and generic file) upload #244

Closed
ludagoo opened this issue May 24, 2015 · 7 comments
Closed

Add support for image (and generic file) upload #244

ludagoo opened this issue May 24, 2015 · 7 comments
Assignees
Labels
Milestone

Comments

@ludagoo
Copy link

@ludagoo ludagoo commented May 24, 2015

This is a feature request...

I think it would be cool to be able to drag and drop images into the chat. Then behind the curtain convos would upload it to the server and actually send a link to IRC. This would be a great addition to the auto loading of images that convos already does.


Comment from @jhthorsen: See also #90

@jhthorsen jhthorsen changed the title Bilt in imgur Add support for image upload May 25, 2015
@jhthorsen
Copy link
Member

@jhthorsen jhthorsen commented May 25, 2015

I agree. That would be very cool. Not sure when we get time to implement it though...

@jhthorsen jhthorsen self-assigned this May 28, 2015
@jhthorsen jhthorsen removed their assignment Sep 1, 2015
@jhthorsen jhthorsen added this to the batcode milestone Mar 31, 2016
@anonsubmitter
Copy link

@anonsubmitter anonsubmitter commented Aug 14, 2016

Adding P2P file transfers using WebRTC and WebTorrent would be cool. No server between the sender and the recipient, so it's faster and more private. You could maybe borrow some code from FilePizza.

@anonsubmitter
Copy link

@anonsubmitter anonsubmitter commented Aug 14, 2016

Imgur compresses larger photos, so I think that I think either Kuuv.io (100 MB), imgbox (10 MB), ImgPile (50 MB), Lambda (50 MB), vgy.me (20 MB), tinyimg.io (10 MB), VoatPic.me (100 MB), abload.de (10 MB) or NyanIMG could be good to add for images that are of high resolution and large filesize. Postimage.org doesn't support large uploads, but it keeps the original filenames, which is nice. There's also a decentralized, open source image hosting site called ifps.pics.

Here are also a bunch of alternative image hosts:
https://voat.co/v/VoatUserGroup/comments/1149212
https://www.reddit.com/r/imguralternatives/top/?sort=top&t=all

And no, I'm not saying that we need to support all of these image hosts. One stable image host that doesn't compress high quality images should be enough and if more are added that's just a nice bonus that gives the user more choice and the image upload function more stability (in case a site closes down or a site's API changes to the point that image uploads from Convos don't work).

@jhthorsen jhthorsen changed the title Add support for image upload Add support for image (and generic file) upload Aug 15, 2016
@jhthorsen jhthorsen self-assigned this Aug 15, 2016
@jhthorsen
Copy link
Member

@jhthorsen jhthorsen commented Aug 15, 2016

Excellent ideas! Also DCC as we discussed yesterday would be nice to have, but I think the protocol is a bit complicated. Either way, I think I will implement my initial idea, since I think it will be the fastest route (for me) to get something working:

  • Drag/drop or click upload file. Select one or more files. Upload
  • Convos will receive the files and store them under something like convos/user@example.com/files
  • Convos generates a unique URL for each file
  • Convos will generate a message or fill in the input field with the URL to each of the files.

Each files should have a unique URL. I'm considering one of these:

@systemz64
Copy link

@systemz64 systemz64 commented Jan 26, 2017

Slack and Hipchat use s3 for their storage - it means you are not limited to images only and its offloaded. I can upload a word file just as easily. You could have this as a configurable option so that I could install my AWS credentials into the system and all storage would be in my aws account.

This feature would be a big plus point (whether s3 or not)

jhthorsen added a commit that referenced this issue Apr 13, 2017
@jhthorsen jhthorsen removed their assignment Oct 15, 2017
@jhthorsen jhthorsen modified the milestones: batcode, 1.03 Oct 27, 2019
@jhthorsen jhthorsen modified the milestones: 1.03, Backlog Nov 5, 2019
@jhthorsen jhthorsen modified the milestones: Backlog, 1.11 Nov 21, 2019
@jhthorsen jhthorsen self-assigned this Dec 6, 2019
jhthorsen added a commit that referenced this issue Dec 21, 2019
  - Replaces Convos::Plugin::Paste
  - Defined uploadFile and getFile endpoints
  - Add /file/:uid/:fid endpoint
jhthorsen added a commit that referenced this issue Dec 21, 2019
jhthorsen added a commit that referenced this issue Dec 21, 2019
@jhthorsen jhthorsen closed this in 73e1555 Dec 21, 2019
jhthorsen added a commit that referenced this issue Dec 21, 2019
As a user, I would like to upload files, closes #244
@jhthorsen jhthorsen removed the in_progress label Dec 21, 2019
@jhthorsen
Copy link
Member

@jhthorsen jhthorsen commented Dec 23, 2019

@anonsubmitter: I'm not going to add "crunching" of the images in this iteration. The files gets uploaded and stored exactly how you upload it. Please submit a new issue in 2020, if that's not good enough.

I completely dropped "P2P file transfers", since it's too complicated and I don't really see the benefit. An uploaded file will be stored on the Convos server and a link is shared in the channel or private conversation. The logic is in a plugin though, so you can override the logic however you like.

The file URL looks like this: https://example.com/file/2/1B2M2Y8sgTpgmY7P, where "2" is the UID of the user (keeping the email private) and a hash afterwards, which makes it incredible hard to guess the URL.

I'm reopening this issue though, since there are some things to figure out:

  • I cannot upload from my iPhone.
  • Need to figure out a default max image size, and handle error codes if the uploaded file is bigger. The max now is 10MB.
  • Need to fix the styling of the upload button.
@jhthorsen jhthorsen reopened this Dec 23, 2019
jhthorsen added a commit that referenced this issue Dec 23, 2019
jhthorsen added a commit that referenced this issue Dec 23, 2019
  - Add correct filename to downloaded files
  - Add required class name "paste" to <pre>
jhthorsen added a commit that referenced this issue Dec 23, 2019
  ...since the Convos admin probably need to set it in the reverse proxy
  as well.
@jhthorsen
Copy link
Member

@jhthorsen jhthorsen commented Dec 24, 2019

It seems like @marcusramberg is able to upload from his iPhone, so I'm closing this for now.

@jhthorsen jhthorsen closed this Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.