whio-api-sdk 1.0.215-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.
|
@@ -96,10 +96,14 @@ export class BaseClient {
|
|
|
96
96
|
}
|
|
97
97
|
return new Promise((resolve, reject) => {
|
|
98
98
|
const xhr = new XMLHttpRequest();
|
|
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'));
|
|
99
102
|
xhr.upload.addEventListener('progress', (event) => {
|
|
100
|
-
console.log('Upload progress:', event);
|
|
103
|
+
console.log('Upload progress event fired:', event.loaded, '/', event.total, 'lengthComputable:', event.lengthComputable);
|
|
101
104
|
if (event.lengthComputable && onProgress) {
|
|
102
105
|
const percentage = Math.round((event.loaded / event.total) * 100);
|
|
106
|
+
console.log('Calling onProgress with percentage:', percentage);
|
|
103
107
|
onProgress(percentage);
|
|
104
108
|
}
|
|
105
109
|
});
|
package/package.json
CHANGED
|
@@ -106,11 +106,15 @@ export class BaseClient {
|
|
|
106
106
|
|
|
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
|
});
|