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
When using getPhoto with resultType: CameraResultType.Uri on iOS, the returned webPath value ist missing the capacitor://localhost part at the beginning. Instead something like this is returned: _capacitor_file_/private/var/mobile/Containers/Data/Application/<id omitted by me>/tmp/photo-9.jpg
Expected Behavior
Passing the returned path value through Capacitor.convertFileSrc returns something like capacitor://localhost/_capacitor_file_/private/var/mobile/Containers/Data/Application/<id omitted by me>/tmp/photo-9.jpg, so webPath should look like this too.
On android webPath correctly begins with the android specific prefix http://localhost.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.
Bug Report
Plugin(s)
@capacitor/camera@1.0.2
Capacitor Version
Platform(s)
iOS
Current Behavior
When using getPhoto with
resultType: CameraResultType.Uri
on iOS, the returnedwebPath
value ist missing thecapacitor://localhost
part at the beginning. Instead something like this is returned:_capacitor_file_/private/var/mobile/Containers/Data/Application/<id omitted by me>/tmp/photo-9.jpg
Expected Behavior
Passing the returned
path
value throughCapacitor.convertFileSrc
returns something likecapacitor://localhost/_capacitor_file_/private/var/mobile/Containers/Data/Application/<id omitted by me>/tmp/photo-9.jpg
, sowebPath
should look like this too.On android
webPath
correctly begins with the android specific prefixhttp://localhost
.Code Reproduction
Use
getPhoto
withCameraResultType.Uri
:Additional Context
Workaround: Instead of using
webPath
, use the value returned byCapacitor.convertFileSrc(path)
.The text was updated successfully, but these errors were encountered: