如何设置权限以在Android 12手机上打开浏览器中的本地文件?
我的女儿有Google Pixel 5/fi手机,我也有一部Android手机。
在以前的Android版本(例如9)上,您可以通过进入设置> gt; chrome> permissions> gt; gt; gt;并选择“存储”。
在Android 12中,如果您进入设置> apps> chrome> permissions>该项目现在称为“文件和媒体”,有3个选项:
允许所有文件的管理
允许访问媒体只
允许
第一个选项执行我想要的,就像Android 9中的旧“存储”选项
。此选项不在Chrome(或任何其他浏览器)的列表中。是否有一些更高级别的开关,例如:“允许浏览器访问所有文件”?
我猜这是大多数人都希望“仅允许访问媒体”的某种沙盒保护。但是,我确实希望Chrome访问本地文件。
我也可以在三星手机上复制它,但是由于女儿的像素手机(Pixel 5/google fi/build sp2a.220505.002)完全是一个Google堆栈,我想我想指出的是,这是一个可以表明这是' t其他一些供应商的问题。
How do I set permissions to open a local file in a browser on an Android 12 phone?
My daughter has a Google Pixel 5/Fi phone and I also have an Android phone.
On previous Android releases (e.g. 9) you could let Chrome open local files by going into Settings>Apps>Chrome>Permissions> and selecting "Storage".
In Android 12, if you go into Settings>Apps>Chrome>Permissions> the item is now called "Files And Media" and has 3 options:
Allow Management of All Files
Allow Access to Media Only
Don't Allow
The first option does what I want, just like the old "Storage" option in Android 9.
EXCEPT that this option is NOT on the list for Chrome (or any other browser). Is there some higher level switch somewhere like: "Allow Browsers to access All Files"?
I'm guessing this is some sort of sandbox protection that most people would want to default to "Allow Access to Media Only". However I DO want Chrome to access local Files.
I can also reproduce this on my Samsung phone, but as my daughter's Pixel phone (Pixel 5/Google Fi/Build SP2A.220505.002) is entirely a Google stack, I thought I'd point it out with that one to show this isn't some other vendor's issue.
发布评论
评论(1)
FF中有非常简单的解决方案。
但是现在不在标准或每晚播放构建中起作用。
但是能够重复使用几年的htm页面与ff中的本地文件一起工作:
fennec-68.11.0.multi.android-arm.apk 在此处找到 https://support.mozilla.org/en-us/questions/1300966 sesp。
<代码>关于:config
security.fileuri.strict_origin_policy
true - &gt; false
(在此处找到 https://dev.to/dengel29 /当前文件夹中的“加载 - 局部文件”中的firefox and-chrome-m9f )
和已知的bin文件再次通过同一旧的简单AJAX加载。
There was quite simple solution in FF.
But does not work in standard nor Nightly Play build now.
But was able to reuse few years old HTM page working with local files in FF:
fennec-68.11.0.multi.android-arm.apk
found here https://support.mozilla.org/en-US/questions/1300966 resp. https://download.mozilla.org/?product=fennec-latest&os=android&lang=multiabout:config
security.fileuri.strict_origin_policy
True -> False
(found here https://dev.to/dengel29/loading-local-files-in-firefox-and-chrome-m9f)
And known bin files in current folder are load again by same old simple AJAX.