Browse Source

Merge pull request #615 from JonStargaryen/master

keep asset url to detect compression
David Sehnal 2 years ago
parent
commit
524e6d4f81
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      src/mol-util/assets.ts

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ Note that since we don't clearly distinguish between a public and private interf
 ## [Unreleased]
 
 - Make `PluginContext.initContainer` checkered canvas background optional
+- Store URL of downloaded assets to detect zip/gzip based on extension
 
 ## [v3.23.0] - 2022-10-19
 

+ 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], 'raw-data');
+                const file = new File([data], asset.url);
                 this._assets.set(asset.id, { asset, file, refCount: 1 });
                 return Asset.Wrapper(await readFromFile(file, type).runInContext(ctx), asset, this);
             });