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

[Android] Returned path should start with file:///data... instead of file://... #137

Closed
1 task done
hrastnik opened this issue Nov 28, 2022 · 5 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@hrastnik
Copy link

hrastnik commented Nov 28, 2022

Current behavior

Returned path starts with file://data making the URI invalid

Expected behavior

Return path should start with file:///data....

This fixes the issue:

const uri = brokenURI.startsWith("file://") && !brokenURI.startsWith("file:///") ? brokenURI.replace("file://", "file:///") : brokenURI;

or shorter

const uri = brokenURI.replace(/^file:\/\/([^/])/, "file:///$1");

Platform

  • Android

React Native Version

0.70.6

React Native Compressor Version

1.6.1

@github-actions
Copy link

👋 @hrastnik
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@iasreact1
Copy link

@hrastnik please help me to solve the issue
FAILURE: Build failed with an exception.

What went wrong:
Could not determine the dependencies of task ':react-native-compressor:compileDebugAidl'.
Could not resolve all task dependencies for configuration ':react-native-compressor:debugCompileClasspath'.
Could not resolve io.github.lizhangqu:coreprogress:1.0.2.
Required by:
project :react-native-compressor

Skipped due to earlier error
Skipped due to earlier error

after installing react-native-compressor-1.6.1 and with react-native-0.70.6 ....Please help sir

@falmesino
Copy link

I just want to say thank you, i didn't notice the missing "/".

@numandev1
Copy link
Owner

@hrastnik @falmesino can you check this issue by latest version of this package?

@hrastnik
Copy link
Author

hrastnik commented Oct 3, 2023

Just tested it, looks good!

@numandev1 numandev1 added the bug Something isn't working label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

4 participants