We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using Node.js 16.14.2 and pCloud SDK 2.0.0. My script is the following:
const client = pcloud.createClient('bx...........................7y'); const { upload } = client; try { upload('somefile.pdf', 0, { onBegin: () => console.log('begin'), onProgress: ({ loaded, total }) => console.log(loaded, total, (loaded / total * 100).toFixed(2) + '%') }) } catch (e) { console.log(e) }
But then I see the following output:
begin 173 1844539 0.01% 65709 1844539 3.56% 131245 1844539 7.12% 196781 1844539 10.67% 262317 1844539 14.22% 327853 1844539 17.77% 393389 1844539 21.33% 458925 1844539 24.88% 524461 1844539 28.43% 589997 1844539 31.99% 655533 1844539 35.54% 721069 1844539 39.09% 786605 1844539 42.65% 852141 1844539 46.20% 917677 1844539 49.75% 983213 1844539 53.30% 1048749 1844539 56.86% 1114285 1844539 60.41% 1179821 1844539 63.96% 1245357 1844539 67.52% 1310893 1844539 71.07% 1376429 1844539 74.62% 1441965 1844539 78.17% 1507501 1844539 81.73% 1573037 1844539 85.28% 1638573 1844539 88.83% 1704109 1844539 92.39% 1769645 1844539 95.94% 1835181 1844539 99.49% 1844481 1844539 100.00% 1844539 1844539 100.00% node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^ [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] { code: 'ERR_UNHANDLED_REJECTION' }
Any idea what might cause the issue?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using Node.js 16.14.2 and pCloud SDK 2.0.0. My script is the following:
But then I see the following output:
Any idea what might cause the issue?
The text was updated successfully, but these errors were encountered: