Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: previewAnyFile does not work with encoded links like Firebase Storage #35

Open
iAMkVIN-S opened this issue Sep 14, 2021 · 3 comments

Comments

@iAMkVIN-S
Copy link

iAMkVIN-S commented Sep 14, 2021

Ionic:
Ionic CLI : 6.12.4 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 6.0.0-beta.5
Utility:
cordova-res : 0.15.3
native-run : 1.4.1
System:
NodeJS : v14.4.0 (/usr/local/bin/node)
npm : 6.14.5
OS : macOS Big Sur

Running an Ionic Application using React.

The URL passed to PreviewAnyFile.previewPath does not work if it's a Firebase Storage URL

I noticed another user proposing to use a decoder, however if you decode the Firebase URL and replace the %2F with a /, Firebase will not return you an image anymore.

Code:
image

Error:
image

I tried passing both a name.ext (name.jpeg) and mime type (image/jpeg). I also tried adding the extension to the Firebase URL, which doesn't break the URL, but still doesn't work in the plugin.

Cheers

@mostafa-mansour1
Copy link
Owner

can you provide me an example of Firebase Storage URL to check from my side

@venkaa28
Copy link

venkaa28 commented Dec 2, 2021

https://firebasestorage.googleapis.com/v0/b/app_name/o/folder%2Ffolder%2Ffile_name?alt=media&token=token_id

This is an example URL, I'm having the same issue as the person above. The app name, folder names, file name, and token id were replaced for safety sake.

@venkaa28
Copy link

Any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants