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

PDF file selection not working for some URIs #778

Closed
vyankatesh24 opened this issue Jul 1, 2019 · 15 comments · Fixed by #793
Closed

PDF file selection not working for some URIs #778

vyankatesh24 opened this issue Jul 1, 2019 · 15 comments · Fixed by #793

Comments

@vyankatesh24
Copy link
Contributor

  • PDF file selection not working for some URIs in Split PDF and other fragments where PDF selection is required.
  • Error while converting URI to Path.
  • Error:
    Unknown URI: content://downloads/public_downloads/3798
@Swati4star
Copy link
Owner

Is this just in "split PDF" or somewhere else too?

@vyankatesh24
Copy link
Contributor Author

All fragments where we have to select PDF file(s). Like Merge PDF, Invert PDF, Add Password... etc.

@ioshomebrew
Copy link
Contributor

Can you give me a sample URL to work with?

@Swati4star
Copy link
Owner

@ioshomebrew It's already there in issue description.

@ioshomebrew
Copy link
Contributor

Ok, looking thru source code now to diag issue

@ioshomebrew
Copy link
Contributor

Found the issue, it appears that the RealPathUtil.getRealPath is adding extra data to the selected file

@ioshomebrew
Copy link
Contributor

The issue seems to be with some file explorer apps, with EZ File Explorer it didn't work because it added extra characters to the Uri, but with EX File Manager it worked fine

@Swati4star
Copy link
Owner

Swati4star commented Aug 21, 2019

@vyankatesh24 Are you facing the issue with just EZ file explorer or other explorers too?
cc\ @ioshomebrew

@ioshomebrew
Copy link
Contributor

I've only tested 2 explorers so far

@ioshomebrew
Copy link
Contributor

Just found a potential fix

@ioshomebrew
Copy link
Contributor

I added in a feature to replace extra characters with /

@ioshomebrew
Copy link
Contributor

It worked with the 2 file explorers I used

@ioshomebrew
Copy link
Contributor

The Fix is now on my forked repo

@Swati4star
Copy link
Owner

@ioshomebrew Can you create a PR?

@ioshomebrew
Copy link
Contributor

Just did it

Swati4star pushed a commit that referenced this issue Oct 2, 2019
WIth some file explorers it changed the last / with : which caused erors.
I added in a regex to replace those chars with / to fix the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants