-
Notifications
You must be signed in to change notification settings - Fork 6
onProgress not being called #26
Comments
The function skipper-better-s3/lib/uploader.js Lines 106 to 134 in 4c45e4e
Could you show your code that leads you to believe that the function is not being called? Thanks! |
I do not see anything on the console. |
Thanks. Can you share the code where you actually use that options object? With the upload request etc. |
This is the whole code |
Does this issue really exists or there is some problem with my code? |
Waiting for your reply? |
I think the problem is that you have to pass the progress listener in a sub-object called const options = {
adapter: require('skipper-better-s3'),
// ...
request: {
onProgress: progress => console.log(progress),
},
} Could you try this approach and let me know if this fixes the progress monitoring issue for you? 🙏
|
@robertrossmann
The configuration object I have is : Any thoughts? ========================================
so now when calling the adapter from my code I use : So now it seems to be correct but I still can't see any printouts. I tried debugging it by attaching chrome debugger to the sails app, and I can see that 'trackProgress()' function is called inside uploader.js but it seems like instead of calling my callback function some other empty function is called. }) Note, I did try adding console.log call inside 'trackProgress()' and it is working. but it is not calling my provided onProgress. Any Ideas on how I can move forward with this? I feel I'm very close to resolving this ==================================
}` |
After digging into the code, I think I found the source of the bug. The merge fails when an object value is function. The mergeObject function treats the function as an Object and calls the 'doMerge' function recrusively. added a check if the value is not function: |
The function onProgress is not being called.
The text was updated successfully, but these errors were encountered: