Comments (4)
Hi @alexandis,
to allow directory selection in the open file dialog, just add the webkitdirectory
attribute to your <input type="file" />
element. Hope this helps.
from ngx-dropzone.
When I use this attribute - there is a system message, offering me to upload files somewhere (when I agree - nothing happens). It is not an expected behavior for me, saying honestly. What I would like to have instead - selecting folder acted in the same way as if I just "drag-n-drop"-ed this folder, so the same handler invoked which I now assigned to drop
event... I've tried to assign handler to submit
, supposing "Upload" would invoke it - but it was not invoked. event.target.files
in change
event returns 0 elements too. Don't have idea what's going on. Probably I just need to give up the idea of using webkitdirectory
...
from ngx-dropzone.
Hi @alexandis,
when using the webkitdirectory
attribute, the native open file dialog is instructed to allow only folder selection which works fine if the browser supports it. In this case, the (change)
event of the <input type="file" />
element is invoked and returns a flat file list with the webkitRelativePath
property set on each item.
Using the same handler for both selecting and dropping is not possible because they behave totally different.
Please try dropping a folder and selecting one from the system dialog with a minimal example, starting from
...
<input type="file" fileInput webkitdirectory multiple />
...
If you have any further issues, provide some code examples please.
from ngx-dropzone.
I've tried webkitdirectory
again with ngModelChange
- at least it process ALL the files, even if there are thousands of them. But - this standard dialog does not allow me selecting several folders... :( so it is not so flexible as drag-n-drop, unfortunately.
Anyway, I think I can close the original bug, because - with specific limitations - the directory selection DOES work. Thank you for your suggestions and advices.
from ngx-dropzone.
Related Issues (9)
- Cannot find module 'cdk' or its corresponding type HOT 1
- Dependency on RXJS 6.6 for Angular 16 HOT 1
- Feature request: Add option to append to current form field value HOT 7
- Suggestion: icon parameter, default preview style HOT 4
- Suggestion: support directories on drag and drop HOT 10
- Update to Angular 17 HOT 2
- [ERROR The ngx-dropzone component requires a child of <input type="file" fileInput />. HOT 5
- Any way to make its markup work on Angular 15? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-dropzone.