bruce-models 2.3.2 → 2.3.3

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.
@@ -5361,6 +5361,15 @@ var ClientFile;
5361
5361
  req,
5362
5362
  onProgress
5363
5363
  });
5364
+ // TODO: Check if we can add it to the request like the small file upload.
5365
+ if ((clientFile === null || clientFile === void 0 ? void 0 : clientFile.ID) && purpose) {
5366
+ yield UpdatePurpose({
5367
+ api,
5368
+ fileId: clientFile.ID,
5369
+ purpose,
5370
+ req
5371
+ });
5372
+ }
5364
5373
  }
5365
5374
  else {
5366
5375
  req.onProgress = (progress) => {
@@ -5370,16 +5379,13 @@ var ClientFile;
5370
5379
  uploaded: false
5371
5380
  });
5372
5381
  };
5382
+ if (purpose) {
5383
+ req.formData = {
5384
+ Purpose: purpose
5385
+ };
5386
+ }
5373
5387
  clientFile = yield api.UPLOAD("file/uploadNew", file, req);
5374
5388
  }
5375
- if ((clientFile === null || clientFile === void 0 ? void 0 : clientFile.ID) && purpose) {
5376
- yield UpdatePurpose({
5377
- api,
5378
- fileId: clientFile.ID,
5379
- purpose,
5380
- req
5381
- });
5382
- }
5383
5389
  onProgress === null || onProgress === void 0 ? void 0 : onProgress({
5384
5390
  percent: 100,
5385
5391
  uploaded: true