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

Can't use getFromHTTPRequest for firebase storage #39

Closed
rosostolato opened this issue Apr 10, 2024 · 6 comments
Closed

Can't use getFromHTTPRequest for firebase storage #39

rosostolato opened this issue Apr 10, 2024 · 6 comments

Comments

@rosostolato
Copy link

rosostolato commented Apr 10, 2024

Firebase storage urls are of format: ${url}?alt=media&token=${token}

To check if the file is db or zip, the script gets the full URL string and checks for the last chars without discarding the query params, causing the operation to be canceled.

if( url.substring(url.length - 3) === ".db") {
await this.copyDatabase(url, overwrite);
message = "db";
}
if( url.substring(url.length - 4) === ".zip") {
await this.unzipDatabase(url, overwrite);
message = "zip";
}

@jepiqueau
Copy link
Owner

@rosostolato Fixed in 2.6.3. Please close the issue after successful tests

@rosostolato
Copy link
Author

I couldn't make it work on some quick tests I did. I'm out of time now, so I just rolled back to version 2.6.2 and I'm adding an extra param to the end of the string with the extension format, just a workaround in the meantime. I will try again later and will bring some feedbacks.

https://...?alt=media&token=...&ext=.zip

@jepiqueau
Copy link
Owner

@rosostolato can you give me the url example for .db and .zip that you are using as for me it works

@jepiqueau
Copy link
Owner

@rosostolato fix in 2.6.4

@rosostolato
Copy link
Author

Thank you!

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

2 participants