@overmap-ai/core 1.0.44-tiptap.3 → 1.0.44-tiptap.5

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.
@@ -6522,17 +6522,22 @@ class FileService extends BaseApiService {
6522
6522
  let promise = cachedRequestPromises[requestCacheKey];
6523
6523
  let isFirstRequest = true;
6524
6524
  if (!promise) {
6525
- promise = this.enqueueRequest({
6526
- description: "Download file",
6527
- method: HttpMethod.GET,
6528
- url,
6529
- // If in development, we should assume the files are saved at localhost by the Django development server.
6530
- // Setting this to true will lead to localhost:8000 being prepended to the URL.
6531
- isExternalUrl: true,
6532
- isResponseBlob: true,
6533
- isAuthNeeded: false,
6534
- blockers: [expectedSha1],
6535
- blocks: [expectedSha1]
6525
+ promise = new Promise((resolve) => {
6526
+ void this.enqueueRequest({
6527
+ description: "Download file",
6528
+ method: HttpMethod.GET,
6529
+ url,
6530
+ // If in development, we should assume the files are saved at localhost by the Django development server.
6531
+ // Setting this to true will lead to localhost:8000 being prepended to the URL.
6532
+ isExternalUrl: true,
6533
+ isResponseBlob: true,
6534
+ isAuthNeeded: false,
6535
+ blockers: [expectedSha1],
6536
+ blocks: [expectedSha1]
6537
+ }).then((blob) => {
6538
+ const blobToFile = new File([blob], downloadedName ?? expectedSha1, { type: blob.type });
6539
+ resolve(blobToFile);
6540
+ });
6536
6541
  });
6537
6542
  cachedRequestPromises[requestCacheKey] = promise;
6538
6543
  } else {