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.

wrap doesn't work with 'file://' prefix

See original GitHub issue

RN: 0.57.0 rn-fetch-blob: 0.10.13

Tested on iOS. Not sure about android.

var path = 'file:///var/mobile/Containers/Data/Application/2E3CC4FC-1C0F-400B-8CC8-DE53E00B0B7C/Library/Caches/Camera/740DA991-7359-4CF8-B9F4-9BAB69B824AC.jpg'
var body = FetchBlob.wrap(path);
FetchBlob.fetch('POST', url, mime, body);

This will upload a zero byte file to server. To fix it, I have to remove the file:// prefix from path first.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

4reactions
kevinresolcommented, Jan 16, 2020

What is the reason for FetchBlob.wrap not catering for that?

0reactions
amadeu01commented, Jan 16, 2020

it might be related to what is told in the readme

When passing a file path to the library, remove file:// prefix.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Word wrap not working for some file types #23375 - GitHub
wordWrap" is set to "on" . Steps to Reproduce: Create a new file without an extension. Start typing text long enough that it...
Read more >
word-wrap break-word does not work in this example
Use this code (taken from css-tricks) that will work on all browser ... word-wrap:break-word; /* ie */ } -moz-document url-prefix() ...
Read more >
adaptive-wrap-prefix-mode behavior is different/inconsistent ...
I have already tried to toggle visual-line-mode and word wrap but the sometimes correct and sometimes wrong indentation does not change.
Read more >
Configure word wrap and tab settings for different file types
How to configure word wrap and tab settings for different file types · Step 1: Add File Extensions for Word Wrap/Tab Settings ·...
Read more >
Emmet in Visual Studio Code
If you don't want to see Emmet abbreviations in suggestions at all, ... class=${2}> Will only work in html </ol>", "ran": "{ Wrap...
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