reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
19.8k stars 1.14k forks source link

[REF-3343] Can't paste in more than 1 file at the same time #3685

Open dentro-innovation opened 3 months ago

dentro-innovation commented 3 months ago

Describe the bug Not sure if I'm doing something wrong, but it seems to me as if I'm only able to paste in a single file. When I select multiple files on my laptop, copy them and then paste them into the reflex app, only the first file is pasted.

When inspecting my event handler in debug mode, it seems like data is always an array of length 1, even though I pasted e.g. 3 files

async def on_paste(self, data):
        for type, content in data:

Is this something you are aware of?

To Reproduce Try to paste in multiple files

Expected behavior Expected behavior would be that I can paste in as many files as I want.

Specifics (please complete the following information):

Additional context paste event handler of this PR https://github.com/reflex-dev/reflex/pull/3513

REF-3343

vijayabhaskar78 commented 4 days ago

Can I work on this issue

picklelo commented 4 days ago

@vijayabhaskar78 just assigned you!

vijayabhaskar78 commented 3 days ago

I'm working on issue REF-3343 and am still getting familiar with the codebase. I noticed references to "paste" in files like clipboard.py, dataeditor.py, and paste.js, but I'm unsure how to proceed with handling multiple file pastes. Could you guide me on the best approach or direct me to relevant parts of the code? Any tips would be really helpful as I’m new to contributing.