question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not preview the files in iOS ?

See original GitHub issue

i am new to react-native i unable to preview the files after getting Uri path please help me

DocumentPicker.show({ filetype: [DocumentPickerUtil.allFiles()], },(error,res) => {

  console.log(
    res.uri,
    res.type, // mime type
    res.fileName,
    res.fileSize
 );
  if(res) {
    FileViewer.open(res.uri)
    .then(() => {

      console.log("Success")

    })
    .catch(_err => {

      console.log("Error")
    });
  }

  
});

}`

Simulator Screen Shot - iPhone X - 2019-03-22 at 12 32 23 2019-03-22 14:54:12.125034+0530 D_I_Picker[21219:7357050] [default] QLUbiquitousItemFetcher: <QLUbiquitousItemFetcher: 0x283e85ae0> could not create sandbox wrapper. Error: Error Domain=NSPOSIXErrorDomain Code=2 "couldn't issue sandbox extension com.apple.quicklook.readonly for '/file:/private/var/mobile/Containers/Data/Application/8B1B80D1-96E0-4415-9C82-7F0BC1EB4357/tmp/org.reactjs.native.example.D-I-Picker-Inbox/Jan%20to%20Feb%2021%20st%20stmt.pages': No such file or directory" UserInfo={NSDescription=couldn't issue sandbox extension com.apple.quicklook.readonly for '/file:/private/var/mobile/Containers/Data/Application/8B1B80D1-96E0-4415-9C82-7F0BC1EB4357/tmp/org.reactjs.native.example.D-I-Picker-Inbox/Jan%20to%20Feb%2021%20st%20stmt.pages': No such file or directory} #PreviewItem

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
TalMarscommented, May 27, 2019

@bhoomesh950 use this solution: const decUrl = decodeURI(content.uri).replace('file://', '') content.uri - uri from DocumentPicker

0reactions
joramirezStackitcommented, Jan 20, 2022

I think I found the problem, in my case I had something like this “%20” (seems like an space) in the path I was using and I did something like this uri.replace(‘file://’, ‘’).replaceAll(‘%20’, ’ ') and it worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

Files App Bugged? Please Help! - Apple Support Communities
When I open the Files app, I see none of my files and simply see a message on the screen that reads, “No...
Read more >
How to Fix iOS Files App Not Working: Here's Complete Guide
Go to the Settings > Next, Tap on your Profile name > Scroll down and Tap on iCloud.
Read more >
On My iPhone/iPad Option Not Showing/Missing in Files App ...
If you do not see On My iPhone/iPad in the Files app, here is how you can enable ... Preview the files, select...
Read more >
Types Of File Preview Errors And How To Handle Them
First, verify that your file hasn't been corrupted. To do this, try to open it with some other application on your desktop. If...
Read more >
How to Fix Files App Not Working on iPhone - Guiding Tech
Unlike most iOS stock apps, the Files app is actually removable. If you don't see the Files app on your Home screen or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found