I dove into "how upload many photos from camera in #TurboNative land" again today.

I called in my Competent #JavaScript, #Kotlin, and #Swift colleague, A (not on the Fediverse, AFAIK).

She recommended we confirm we have permissions to use the camera and stepped me through requesting permissions for #Android in a #TurboAndroid app, mostly by talking me through this #TurboAndroid github issue https://github.com/hotwired/turbo-android/issues/336

After about an hour, we were able to prompt for permissions and confirm that they were granted!

But sadly, still no joy.

We dug into the Uppy source code; which led to this little line here: https://github.com/transloadit/uppy/blob/bdc485d52753ec0bac29cfdd25c1bd824060ba20/packages/%40uppy/dashboard/src/components/AddFiles.tsx#L81

Because we don't *explicitly set the facing mode*, Uppy wasn't setting the `capture` attribute on the Input!

So after adding `{ videoConstraints: { facingMode: 'environment' } ` to the Uppy AWS plugin, we can capture photos on #Web, #TurboIOS and #TurboNative without any changes to the Swift/Kotlin code.

😭 😭 😭

But at least the fix is a 4 line solution now.

Granting device camera access to my website · Issue #336 · hotwired/turbo-android

Hi 👋 I'm having some issues trying to access Camera capabilities in my Android App. I am building an app where one of the functionalities is to use the camera, display it on the page and scan QR co...

GitHub