You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the opened issues and there are no duplicates
Describe the bug
In order to manage all users file in my flet app I use a filemanager file and request the permission for MANAGE_EXTERNAL_STORAGE in Flet but the application still have a problem.
I tried to grant STORAGE also but I don't know why it get deny every time, I also added
def get_external_storage_directory(self) -> Path:
storage_dir = os.getenv("EXTERNAL_STORAGE") or os.getenv("HOME")
if storage_dir is None:
# Fallback to current directory if no suitable environment variable is found.
storage_dir = "."
return Path(storage_dir)
def get_file_path(self, filename: str) -> Path:
"""Returns the full path of a file."""
return self.base_path / ("src/" + filename)
#other function write/read etc...
main.py
ph = ft.PermissionHandler()
page.overlay.append(ph)
page.update()
permission_container = ft.Column()
def request_permissions(e):
manage_result = ph.request_permission(ft.PermissionType.MANAGE_EXTERNAL_STORAGE)
storage_result = ph.request_permission(ft.PermissionType.STORAGE)
if manage_result and storage_result:
#permission_container.controls.clear()
page.add(ft.Text(f"Requested MANAGE_EXTERNAL_STORAGE: {manage_result}"))
page.add(ft.Text(f"Requested STORAGE: {storage_result}"))
page.update()
else:
page.add(ft.Text("Failed to grant required permissions."))
To reproduce
s
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 11
Flet version
0.25.2
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
No response
Additional details
No response
The text was updated successfully, but these errors were encountered:
I fixed my error something with the app structures that is different between Windows 11 and Android. I don't know how to dlete this issue because its pointless so if anyone could delete it or tell me how to remove it.
Duplicate Check
Describe the bug
In order to manage all users file in my flet app I use a filemanager file and request the permission for MANAGE_EXTERNAL_STORAGE in Flet but the application still have a problem.
I tried to grant STORAGE also but I don't know why it get deny every time, I also added
in pyproject.toml
Code sample
filemanager.py
main.py
To reproduce
s
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 11
Flet version
0.25.2
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
No response
Additional details
No response
The text was updated successfully, but these errors were encountered: