curtain-web-api 1.0.85 → 1.0.87
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.
|
@@ -864,6 +864,7 @@ export class CurtainWebAPI {
|
|
|
864
864
|
if (uploadId) {
|
|
865
865
|
try {
|
|
866
866
|
const sha256Hash = sha256Hasher.getHash('HEX');
|
|
867
|
+
console.log(`[CHUNK UPLOAD] Complete - totalSize: ${totalSize}, final hash: ${sha256Hash}`);
|
|
867
868
|
const completionResponse = await this.completeCurtainUpload(uploadId, {
|
|
868
869
|
sha256: sha256Hash,
|
|
869
870
|
name: options?.name,
|
|
@@ -889,12 +890,12 @@ export class CurtainWebAPI {
|
|
|
889
890
|
}
|
|
890
891
|
const end = Math.min(offset + chunkSize, totalSize);
|
|
891
892
|
const chunk = file.slice(offset, end);
|
|
892
|
-
const chunkFile = new File([chunk], file.name, { type: file.type });
|
|
893
893
|
try {
|
|
894
894
|
const chunkBuffer = await chunk.arrayBuffer();
|
|
895
|
+
console.log(`[CHUNK UPLOAD] Chunk offset: ${offset}, size: ${chunkBuffer.byteLength}, end: ${end}`);
|
|
895
896
|
sha256Hasher.update(chunkBuffer);
|
|
896
897
|
const response = await this.uploadCurtainChunk({
|
|
897
|
-
file:
|
|
898
|
+
file: chunk,
|
|
898
899
|
filename: file.name,
|
|
899
900
|
upload_session_id: options?.upload_session_id,
|
|
900
901
|
description: options?.description,
|
package/package.json
CHANGED
|
@@ -1153,6 +1153,7 @@ export class CurtainWebAPI {
|
|
|
1153
1153
|
if (uploadId) {
|
|
1154
1154
|
try {
|
|
1155
1155
|
const sha256Hash = sha256Hasher.getHash('HEX');
|
|
1156
|
+
console.log(`[CHUNK UPLOAD] Complete - totalSize: ${totalSize}, final hash: ${sha256Hash}`);
|
|
1156
1157
|
const completionResponse = await this.completeCurtainUpload(uploadId, {
|
|
1157
1158
|
sha256: sha256Hash,
|
|
1158
1159
|
name: options?.name,
|
|
@@ -1177,14 +1178,14 @@ export class CurtainWebAPI {
|
|
|
1177
1178
|
|
|
1178
1179
|
const end = Math.min(offset + chunkSize, totalSize);
|
|
1179
1180
|
const chunk = file.slice(offset, end);
|
|
1180
|
-
const chunkFile = new File([chunk], file.name, { type: file.type });
|
|
1181
1181
|
|
|
1182
1182
|
try {
|
|
1183
1183
|
const chunkBuffer = await chunk.arrayBuffer();
|
|
1184
|
+
console.log(`[CHUNK UPLOAD] Chunk offset: ${offset}, size: ${chunkBuffer.byteLength}, end: ${end}`);
|
|
1184
1185
|
sha256Hasher.update(chunkBuffer);
|
|
1185
1186
|
|
|
1186
1187
|
const response = await this.uploadCurtainChunk({
|
|
1187
|
-
file:
|
|
1188
|
+
file: chunk,
|
|
1188
1189
|
filename: file.name,
|
|
1189
1190
|
upload_session_id: options?.upload_session_id,
|
|
1190
1191
|
description: options?.description,
|