It worked well. Just have one question, it requires relevant software to be installed on the mobile. Like if i need to view PDF, then it should have a pdf viewer installed. Why i am asking because some mobiles are old and might not have PDF viewer like adobe. It wnt work I guess. Is there a way we can view these documents inside the App itself?? Munish above my solution for all the types of files.
Thanks for helping me out. Much appreciated your help. I tried both the solution given by you and Hamas. Both are correct solution, as he has given me the solution first so technically I am marking his solution.
I wish one can mark both answer correct so would have marked your answer as well.. We can preview URL files like this using these two libraries. Hamas Hassan Hamas Hassan 3 3 silver badges 13 13 bronze badges.
Thanks Hamas for the solution. It works very well. Yes on the android side it is required that there should be a specific app installed for every file type.
However, iOS handles it automatically. Even I test this for the WhatsApp app on android if there is no file software available on the phone they will show a popup about no file opener available something like that. Sign up or log in Sign up using Google. Latest commit. Git stats commits.
Failed to load latest commit information. Change deployment target to 8. Sep 11, Oct 13, Jul 16, Feb 5, Aug 15, Initial commit. May 8, Apr 6, Oct 19, Jan 6, Feb 20, Using own queue, initialized errors, prefixed map method. May 10, Some style updates, warning fixes. Mainly adding path fetching for an…. Aug 18, Feb 28, Updated podspec to support Xcode Aug 3, Move to modern event emitter.
Sep 9, Improve implementation related to event callbacks. Oct 24, Update index. Oct 29, Refactored downloadFile, added stopDownload. Nov 23, Bump ua-parser-js from 0. May 6, Jun 4, View code. About Native filesystem access for react-native Topics react-native download filesystem. MIT License. Releases 38 npm 7 Latest. May 5, Packages 0 No packages published. Used by You signed in with another tab or window.
Reload to refresh your session. Ray I believe this is a workout for android. How about if we want the same to work on ios? I am trying to download an Image from url and display in the device, can you help me out? Ray I am unable to download pdf files on http domain eg. Though, I am able to download https domain pdf files eg.
Please, help me out for http ones. I have also referred to github. Show 2 more comments. AmerllicA Fancy John Fancy John My server asks for an Authorization OAuth token in order to allow the download.
Is there a way to attach a header?? EnriqueDev I don't think so, but you can work around this - just put your token into a GET parameter, and adjust your server to handle it this way — Fancy John. Yes, I know. But then how can I save the result data into the phone filesystem?
EnriqueDev The line of code above actually does save the file into FileSystem. FancyJohn Download icon is not visible on status bar — Jitender.
Show 3 more comments. Rogerio Gelonezi Rogerio Gelonezi 4 4 bronze badges. Sameer Ali Sameer Ali 1. The Overflow Blog. Podcast Who is building clouds for the independent developer?
0コメント