Closed shlroland closed 2 years ago
Sigh, we thought this was solved via #74 that closed #72, but currently the only way that seems to work reliably is what @dwelle has implemented for Excalidraw. Could you try this approach and come back with your results?
Lemme know if you want me to port it from excal.
I wonder if this has to do with HEIC images. For example, if I go to https://browser-fs-access.glitch.me/ and open an image from Photos on iOS Safari, it would never work. If I, however, open a .png
from Files, it works perfectly fine, and so do .txt
files. It also works fine for Excalidraw files, which may or may not have to do with @dwelle's approach.
I more and more suspect iOS has a HEIC problem, since the same code https://browser-fs-access.glitch.me/ works perfectly fine for image files I try on macOS Safari. Note that the input[accept]
value is image/jpg,image/png,image/gif,image/webp,.jpg,.jpeg,.png,.gif,.webp
, so not image/*
and excluding .heic
or any variant of image/heif
, image/heic
, image/heif-sequence
, or image/heic-sequence
. And yet Safari on iOS and macOS let me happily open .heic
images.
I don't recall, and I believe at the time I didn't have access to iOS so I was reproducing only on FF and MacOS Safari, and there it didn't work for .excalidraw
/.json
/.png
files indiscriminately.
its behavior is I can open the file picker,but when i finish the seleting work, the Promise cannt be fullfilled or rejected