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.
@lakesare is there anything we can do about this? It’s coming from the OS/browser, so I’m not sure.
@arturi, relative path being present for a single file on drop is done on purpose, I can change it.
There are a few options:
.relativePaths are set to null..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?
Discussed with the team in relation to #754 and we're leaning towards (1.)
1st one makes sense
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 👍
Clarification: we will make nonfoldered files' .relativePaths always null, whether they were dropped along with some folder, or not.
Most helpful comment
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
DragDropplugin. More thoughts on this appreciated 👍