-
Notifications
You must be signed in to change notification settings - Fork 0
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
file drop convention is different from desktop geoda #1
Comments
This can not be implemented in GeoDa.AI which is a browser app, because the browsers are designed with a sandboxed environment to keep web applications isolated from the local operating system and its file system. Accessing files on a user’s device requires explicit permission or action, like drag-n-drop or file upload dialogs, from the user to ensure they are aware of which files are being accessed. |
Couldn't there be a way that when only a shp file is dropped, there is a dialog that asks if the remaining files, i.e., shx, dbf and prj can be added? |
I think we can not do this as well. Because this will require the browser to access the e.g. dbf and shx files based on the path of dropped shp file. For security reason, the browser cannot access local files on local disk using local file path by default. One needs to select local file by either html upload input element or drag-n-drop. The file access must be used in response to user interactions, such as a button click, to ensure security. |
Maybe then enter a warning that all four files must be dropped. This is actually worse than the desktop
version from a user’s perspective and is actually a royal pain in the neck. It would be nice if this could be
avoided. Let’s find a creative solution. Just saying it can’t be done doesn’t do it for me.
L.
… On Oct 28, 2024, at 4:14 PM, Xun Li ***@***.***> wrote:
I think we can not do this as well. Because this will require the browser to access the e.g. dbf and shx files based on the path of dropped shp file. For security reason, the browser cannot access local files on local disk using local file path by default. One needs to select local file by either html upload input element or drag-n-drop. The file access must be used in response to user interactions, such as a button click, to ensure security.
—
Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA6STH747XJMSO2ONPVFDETZ52SMHAVCNFSM6AAAAABQPVQJFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBSGY2DENZWGI>.
You are receiving this because you authored the thread.
|
Btw, if we turn the https://geoda.ai into a native desktop app, there will be no such a restriction. |
Fixes in https://github.com/GeoDaCenter/reactgeoda/pull/189 |
The file drop requires all four *.shp, *.shx, *.dbf and *.prj files for a "shape file" input. In desktop GeoDa, only the shp file needs to be dropped. That is a bit of an inconsistency. It would be better if specifying the shp file path also locates the associated files.
The text was updated successfully, but these errors were encountered: