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

Support Drag & Drop of images from other browser windows into RoomView #3015

Open
enko opened this issue Jan 21, 2017 · 29 comments
Open

Support Drag & Drop of images from other browser windows into RoomView #3015

enko opened this issue Jan 21, 2017 · 29 comments
Labels
A-File-Upload Attachments and file uploads A-Room-View O-Occasional Affects or can be seen by some users regularly or most users rarely T-Enhancement

Comments

@enko
Copy link

enko commented Jan 21, 2017

It would be nice if you can drag an Image from a website and drop it into the chat view and have it uploaded.

I do not know if this is possible, but it would make the channel with my wife sooo mich nicer, because I could upload the images/gifs directly via d'n'd and would not need to safe them localy.

@ara4n
Copy link
Member

ara4n commented Feb 18, 2017

This should be doable - Google Image Search already supports it. It's probably a very easy modification to the DND code to accept images from browsers as well as boring old files.

@ara4n
Copy link
Member

ara4n commented Feb 18, 2017

@ara4n ara4n changed the title Support Droping Images into the Chat Support Drag & Drop of images from other browser windows into RoomView Feb 21, 2017
@ara4n ara4n added the bounty? label Oct 29, 2017
@status-open-bounty
Copy link

status-open-bounty commented Nov 27, 2017

Current balance: 0.0 ETH
Tokens: SNT: 6000.00
Contract address: 0x936dfd4edefa099b88eb8e6c94a18df7d00bb95b
QR Code
Network: Mainnet
To claim this bounty sign up at https://openbounty.status.im and make sure to update your Ethereum address in My Payment Details so that the bounty is correctly allocated.
To fund it, send ETH or ERC20/ERC223 tokens to the contract address.

@monokh
Copy link

monokh commented Dec 3, 2017

I started to have a look at this but hit a roadblock.
On drag and drop of an image, the only thing that is available is the URL for that image. My initial plan of action was to fetch this or pull the data from a canvas and construct a File object to pass through however this is not possible. Due to cors, an image cannot be loaded cross origin.

I had a look at how google does this. They forward the url of the image to their server to be uploaded. Does riot have such an upload endpoint as well?

@lampholder
Copy link
Member

We don't have such an endpoint today.

This could be implemented by adding a method to the media repository to support ingesting a piece of content from a provided URL rather than the request body.

We would need to think very carefully about what we were doing to make sure nobody could do anything nasty (e.g. have us DOS services on their behalf, or gain privilidged access to our systems by initiating HTTP requests from within our network). That said, we've already considered these issues for our implementation of the URL preview feature, so it shouldn't be too hard to apply to this feature, too.

@monokh
Copy link

monokh commented Dec 13, 2017

@lampholder Ok that makes sense. So where/what actually is the media repository and how can I make changes to it? Some guidance would be helpful. I could probably get this issue and #1953 done together.

@GlulkAlex
Copy link

@monokh @lampholder
can this https://github.com/react-dropzone/react-dropzone be (directly) applicable ?

@oivoodoo
Copy link
Contributor

@GlulkAlex it has already implemented in matrix-react-sdk. it's possible to upload files by dragging to RoomView.

@GlulkAlex
Copy link

Thanks, @oivoodoo .
It is a bit confusing that issues #3015 and #1953 are still open .
My bad, I must have done proper subject research beforehand .

@monokh
Copy link

monokh commented Dec 18, 2017

@GlulkAlex The issue is that files are possible but dragging and dropping images from a web page is not. react-dropzone only works for files.

@GlulkAlex
Copy link

@BloodyIron
Copy link

This would be really cool! Also, if we could have Drag & Drop for URLs too (that aren't images) being pasted into chat?

@gotmyname2018
Copy link

I tried to fix this issue, and found most required works seems have been done by oivoodoo (#2751, #1689) and he is targeting this issue, if this is the case, I will not continue to work on this, is my understanding right?

@oivoodoo
Copy link
Contributor

@gotmyname2018 yeah. I am working on it in free time, a bit stuck in synapse part, but it's really close to be published :)

@georgiemathews
Copy link

@oivoodoo is this still being worked on?

@BloodyIron
Copy link

Still interested in this!

@georgiemathews
Copy link

@BloodyIron I'm not sure how much progress has been made but I'm more than happy to give it a shot.

@oivoodoo
Copy link
Contributor

oivoodoo commented May 12, 2018 via email

@georgiemathews
Copy link

Implemented! You can check the status here: matrix-org/matrix-react-sdk#1893

@BloodyIron
Copy link

@georgiemathews awesome! :D

@georgiemathews
Copy link

@BloodyIron , you're better of tracking the progress already made here: matrix-org/matrix-react-sdk#1689 by @oivoodoo

@BloodyIron
Copy link

Any word on this? D:

@oivoodoo
Copy link
Contributor

oivoodoo commented Sep 17, 2019 via email

@rubo77
Copy link
Contributor

rubo77 commented Oct 9, 2019

Current balance: 0.0 ETH
Tokens: SNT: 6000.00
Contract address: 0x936dfd4edefa099b88eb8e6c94a18df7d00bb95b
QR Code
Network: Mainnet
To claim this bounty sign up at https://openbounty.status.im and make sure to update your Ethereum address in My Payment Details so that the bounty is correctly allocated.
To fund it, send ETH or ERC20/ERC223 tokens to the contract address.

openbounty.status.im seems dead, I hope nobody sent any ETH there? This was archived: https://github.com/status-im/open-bounty

@BloodyIron
Copy link

Any chance we can get this feature going?

@oivoodoo
Copy link
Contributor

oivoodoo commented Oct 10, 2019 via email

@aaronraimist aaronraimist added the A-File-Upload Attachments and file uploads label Feb 4, 2020
@turt2live
Copy link
Member

This appears to have been fixed at some point. Just dragged someone's random avatar to a DM and it uploaded fine.

@t3chguy
Copy link
Member

t3chguy commented May 7, 2022

Not working on Element Nightly on macOS at least

@t3chguy t3chguy reopened this May 7, 2022
@turt2live
Copy link
Member

(works on nightly for Windows)

@SimonBrandner SimonBrandner added O-Occasional Affects or can be seen by some users regularly or most users rarely and removed P2 labels May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-File-Upload Attachments and file uploads A-Room-View O-Occasional Affects or can be seen by some users regularly or most users rarely T-Enhancement
Projects
None yet
Development

No branches or pull requests