whio-api-sdk 1.0.216-beta-staging → 1.0.217-beta-staging
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -97,10 +97,13 @@ export class BaseClient {
|
|
|
97
97
|
return new Promise((resolve, reject) => {
|
|
98
98
|
const xhr = new XMLHttpRequest();
|
|
99
99
|
console.log('Uploading file to:', url);
|
|
100
|
+
console.log('onProgress callback provided:', !!onProgress);
|
|
101
|
+
console.log('FormData has file:', body && body.has && body.has('file'));
|
|
100
102
|
xhr.upload.addEventListener('progress', (event) => {
|
|
101
|
-
console.log('Upload progress:', event);
|
|
103
|
+
console.log('Upload progress event fired:', event.loaded, '/', event.total, 'lengthComputable:', event.lengthComputable);
|
|
102
104
|
if (event.lengthComputable && onProgress) {
|
|
103
105
|
const percentage = Math.round((event.loaded / event.total) * 100);
|
|
106
|
+
console.log('Calling onProgress with percentage:', percentage);
|
|
104
107
|
onProgress(percentage);
|
|
105
108
|
}
|
|
106
109
|
});
|
package/package.json
CHANGED
|
@@ -107,10 +107,14 @@ export class BaseClient {
|
|
|
107
107
|
return new Promise((resolve, reject) => {
|
|
108
108
|
const xhr = new XMLHttpRequest();
|
|
109
109
|
console.log('Uploading file to:', url);
|
|
110
|
+
console.log('onProgress callback provided:', !!onProgress);
|
|
111
|
+
console.log('FormData has file:', body && body.has && body.has('file'));
|
|
112
|
+
|
|
110
113
|
xhr.upload.addEventListener('progress', (event) => {
|
|
111
|
-
console.log('Upload progress:', event);
|
|
114
|
+
console.log('Upload progress event fired:', event.loaded, '/', event.total, 'lengthComputable:', event.lengthComputable);
|
|
112
115
|
if (event.lengthComputable && onProgress) {
|
|
113
116
|
const percentage = Math.round((event.loaded / event.total) * 100);
|
|
117
|
+
console.log('Calling onProgress with percentage:', percentage);
|
|
114
118
|
onProgress(percentage);
|
|
115
119
|
}
|
|
116
120
|
});
|