Browse Source

Merge pull request #623 from JonStargaryen/master

Fix Handling of Gzipped Assets by Reverting #615
David Sehnal 2 years ago
parent
commit
3a98401ada
2 changed files with 4 additions and 2 deletions
  1. 3 1
      CHANGELOG.md
  2. 1 1
      src/mol-util/assets.ts

+ 3 - 1
CHANGELOG.md

@@ -6,10 +6,12 @@ Note that since we don't clearly distinguish between a public and private interf
 
 ## [Unreleased]
 
+- Fix handling of gzipped assets (reverts #615)
+
 ## [v3.24.0] - 2022-11-13
 
 - Make `PluginContext.initContainer` checkered canvas background optional
-- Store URL of downloaded assets to detect zip/gzip based on extension
+- Store URL of downloaded assets to detect zip/gzip based on extension (#615)
 - Add optional `operator.key`; can be referenced in `IndexPairBonds`
 - Add overpaint/transparency/substance theme strength to representations
 - Fix viewport color for transparent background

+ 1 - 1
src/mol-util/assets.ts

@@ -100,7 +100,7 @@ class AssetManager {
                 }
 
                 const data = await ajaxGet({ ...asset, type: 'binary' }).runInContext(ctx);
-                const file = new File([data], asset.url);
+                const file = new File([data], 'raw-data');
                 this._assets.set(asset.id, { asset, file, refCount: 1 });
                 return Asset.Wrapper(await readFromFile(file, type).runInContext(ctx), asset, this);
             });