Comments (4)
A reasonable request, but I don't think browsers allow that, for security purposes. From https://developer.mozilla.org/en-US/docs/Web/API/FileReader:
FileReader
can only access the contents of files that the user has explicitly selected, either using an HTML<input type="file">
element or by drag and drop.
ie they want users to be very explicit about every file they're uploading.
from dash-core-components.
@alexcjohnson Thanks for the response. I can definitely see how this would be a security concern after looking at the link you sent. For our project the application wouldn't be hosted on the web. I came across this post on stack overflow yesterday where it looks like it is possible using HTML form and input tags. Unfortunately, I couldn't get this solution to mesh with Dash components.
Nevertheless, I'll settle for prompting the user with instructions and catching any missing files. Thanks again.
T
from dash-core-components.
Oh interesting - I had never seen webkitdirectory
, though it's been around for years in essentially all browsers - I guess they decided the risk is acceptable? That said, it's not supported by the react-dropzone project we use for dcc.Upload
, and MDN cautions:
Though originally implemented only for WebKit-based browsers,
webkitdirectory
is also usable in Microsoft Edge as well as Firefox 50 and later. However, even though it has relatively broad support, it is still not standard and should not be used unless you have no alternative.
Anyway if anyone is motivated to try and add this support into react-dropzone
we'd be glad to extend that support into Dash.
from dash-core-components.
@alexcjohnson react-dropzone now seems to support folders
from dash-core-components.
Related Issues (20)
- [BUG] dcc.interval missed triggering callback on time HOT 1
- hovertext re-appears after "playing" an animation
- Checklists displayed using dcc.Markdown() are not checkable
- [Feature request] equivalent of n_submit property of 'input' component with global focus
- dcc.graph only triggers one click event on the same scattermapbox marker in sequence
- dcc Graphs reset their relayout on tab change
- XLwings & Dash. Attempting to pre-load Excel before Dash callback to save load time. HOT 1
- dcc.Tab() callback triggering twice HOT 2
- dcc.Download doesn't open a file picker dialog on Safari
- Add Case-Insensitive Sorting Option to Dash Data Table Component
- Hiding the calendar of the DataPickerRange
- Feature Request: Quickly navigate between years/ months of DatePicker HOT 1
- [Bug] dcc.DatePickerSingle layout bug
- Feature Request: Add a max character/digit limit on the Input component
- dcc.DatePickerRange changes disabled_days style when selecting a start date
- Loading chunk 196 failed. HOT 2
- When exporting to SVG legend is cut off.
- It should be possible to position a dcc.Tooltip from figure coordinates rather than screen coordinates
- invalide checklist options using html.Div labels as documented 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 dash-core-components.