@ubercode/dcmtk 0.9.0 → 0.9.1

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.
package/dist/servers.cjs CHANGED
@@ -3126,7 +3126,7 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
3126
3126
  acseTimeout: this.options.acseTimeout,
3127
3127
  dimseTimeout: this.options.dimseTimeout,
3128
3128
  maxPdu: this.options.maxPdu,
3129
- filenameMode: this.options.filenameMode,
3129
+ filenameMode: this.options.filenameMode ?? "unique",
3130
3130
  filenameExtension: this.options.filenameExtension,
3131
3131
  storageMode: this.options.storageMode
3132
3132
  });
@@ -3241,8 +3241,9 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
3241
3241
  const assocDir = worker.associationDir;
3242
3242
  const moveResult = await moveFile(srcPath, destPath);
3243
3243
  const finalPath = moveResult.ok ? destPath : srcPath;
3244
+ const fileSize = await statFileSafe(finalPath);
3244
3245
  worker.files.push(finalPath);
3245
- worker.fileSizes.push(await statFileSafe(finalPath));
3246
+ worker.fileSizes.push(fileSize);
3246
3247
  const openResult = await DicomInstance.open(finalPath);
3247
3248
  if (!openResult.ok) {
3248
3249
  this.emit("error", {
@@ -3258,6 +3259,7 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
3258
3259
  }
3259
3260
  this.emit("FILE_RECEIVED", {
3260
3261
  filePath: finalPath,
3262
+ fileSize,
3261
3263
  associationId: assocId,
3262
3264
  associationDir: assocDir,
3263
3265
  callingAE: data.callingAE,