Comments (15)
First of all, thanks for your quick reply, @filipef101!
The didReceiveData()
function in ReactNativeBlobUtilRequest.mm is only called a single time for a downloaded file, with the receivedBytes
value set to the total file size.
I thought this might have to do with the configuration of our server where the file is loaded from, but even when trying to download an image from a placeholder service (in my case, https://placehold.co/1920x1080.png), the progress event is fired only once with 100%.
EDIT: When using a placeholder service (in my case, https://placehold.co/1920x1080.png), the progress event is fired multiple times and works correctly. So this is not a bug in the awesome react-native-blob-util
module, but a misconfiguration of our server that hosts the images that are downloaded. Sorry for stealing your time!
from react-native-blob-util.
Just one more question, may I ask for the reason why the values for
received
andtotal
in the.progress()
function are returned as Strings, and not Numbers?
That's a good question - but in general all events arepassed as string or dict to JS . For the future only strings. But likely the typecast is simply missing.
from react-native-blob-util.
Can you hook into XCode and debug the lines around here? https://github.com/RonRadtke/react-native-blob-util/blob/master/ios/ReactNativeBlobUtilRequest.m#L321 (download) and https://github.com/RonRadtke/react-native-blob-util/blob/master/ios/ReactNativeBlobUtilRequest.m#L436 (upload)
Does the download handler work as expected? I have a feeling this code hasn't been updated in a long time and lots of deprecated/outdated functions are in use. I haven't tested this myself, but It looks like the bug shouldn't be hard to spot.
from react-native-blob-util.
Hi @cristianoccazinsp ,
Thanks for the reply. Will have a try and let you know.
Thanks
from react-native-blob-util.
Hi @cristianoccazinsp ,
Download progress also works like the same as upload progress.
Any solution for this behaviour in iOS ?
Thanks
from react-native-blob-util.
What happens when you remove .config(.. ?
from react-native-blob-util.
Same here, upload progress in iOS will only trigger two times, around 0.9 and then around completion... i do not have .config parameters...
from react-native-blob-util.
I have the same problem in iOS.
from react-native-blob-util.
The same problem in iOS.
from react-native-blob-util.
有解决办法吗
from react-native-blob-util.
Facing this too in iOS / react-native 0.71.7
/ react-native-blob-util 0.17.3
. Any updates?
from react-native-blob-util.
@skizzo I would start by checking this
Can you hook into XCode and debug the lines around here? https://github.com/RonRadtke/react-native-blob-util/blob/master/ios/ReactNativeBlobUtilRequest.m#L321 (download) and https://github.com/RonRadtke/react-native-blob-util/blob/master/ios/ReactNativeBlobUtilRequest.m#L436 (upload)
Does the download handler work as expected? I have a feeling this code hasn't been updated in a long time and lots of deprecated/outdated functions are in use. I haven't tested this myself, but It looks like the bug shouldn't be hard to spot.
from react-native-blob-util.
Just one more question, may I ask for the reason why the values for received
and total
in the .progress()
function are returned as Strings, and not Numbers?
from react-native-blob-util.
@skizzo I am not getting progress in android as well it is coming as 0 and -1 for received and total respectively
and also download progress event is only firing once and that too when my file is downloaded completely then
any solutions please ?
from react-native-blob-util.
I have the same problem in iOS. have anyone fixed it?
from react-native-blob-util.
Related Issues (20)
- After reinstalling the application, the images recorded by the library are no longer available HOT 5
- Could not determine the dependencies of task ':react-native-blob-util:compileDebugAidl'. (React Native) HOT 1
- android6正常下载,android6以上没有任何反应 HOT 1
- Android 14: Error: Download manager download failed, the file does not downloaded to destination. HOT 12
- react native windows can't able use react-native-blob-util i get error
- iOS fetch uploads empty file HOT 1
- Getting error while writing stream on android 14 HOT 2
- [RangeError: Property storage exceeds 196607 properties] when fetch PUT a 84KB jpg file HOT 1
- Errors in react-native-web HOT 4
- Is it possible to create a blob from a local image uri? HOT 5
- there is warn when ios building
- How to async/await in `readStream`
- react-native-blob-util--fs.isDir Invocation Error
- iOS privacy manifest HOT 1
- Android Download Manager notification only shows up at the end
- response.json() is throwing an Error in Android saying No such file or directory HOT 1
- dest.exists() check fails in writeStream() in files of type content:// HOT 1
- Using writeStream() with content:// Uris HOT 1
- File gets corrupted with readStream() with base64 when using bufferSize defaults
- java to kotlin change example HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-blob-util.