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

Drag and drop vs browse #1509

Closed
akshaybabloo opened this issue Apr 30, 2019 · 7 comments · Fixed by #1602
Closed

Drag and drop vs browse #1509

akshaybabloo opened this issue Apr 30, 2019 · 7 comments · Fixed by #1602
Assignees
Labels

Comments

@akshaybabloo
Copy link

Drag and dropping a file behaves differently when using the browse feature. I am using the dashboard with XHRUpload to upload files/folder.

When I use the browse link to upload a file, say, hello.txt the relativePath shows null but when I drag and drop the same file on it the relative path is /hellow.txt, which is guess is wrong, it should still be null knowing that it's not a folder but a single file.

@arturi
Copy link
Contributor

arturi commented May 20, 2019

@lakesare is there anything we can do about this? It’s coming from the OS/browser, so I’m not sure.

@arturi arturi removed the Triage label May 20, 2019
@lakesare
Copy link
Contributor

@arturi, relative path being present for a single file on drop is done on purpose, I can change it.

There are a few options:

  1. We can make it so that if files were dropped without a folder, then their .relativePaths are set to null.
  2. We can add .relativePath to the files selected via the 'My Device'.

This is also mildly connected to the functionality of selecting folders via the 'My Device' file input, I think it may be doable, should I look into it?

@kvz
Copy link
Member

kvz commented May 22, 2019

Discussed with the team in relation to #754 and we're leaning towards (1.)

@lakesare lakesare self-assigned this May 22, 2019
@akshaybabloo
Copy link
Author

1st one makes sense

@arturi
Copy link
Contributor

arturi commented May 23, 2019

This is also mildly connected to the functionality of selecting folders via the 'My Device' file input, I think it may be doable, should I look into it?

Yes, but from my last research on selecting folders, if you allow folders in “select file” dialog (via file input), you can only select folders then — no files. So we’d need to add a separate icon to the Dashboard, “select folder”, and there’s not much we can do for DragDrop plugin. More thoughts on this appreciated 👍

@lakesare
Copy link
Contributor

lakesare commented May 27, 2019

Clarification: we will make nonfoldered files' .relativePaths always null, whether they were dropped along with some folder, or not.

@oooredooo-bit
Copy link

oooredooo-bit commented Aug 17, 2023

Hi, just want to up this thread again. I am encountering an issue wherein when I select a file via browse and then drag and drop the same file, the dashboard just allow it and does not display duplicate validation message. Does anyone has an idea about this? Thanks in advance!

Just to add, I am using the @uppy/vue dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants