Skip to content

Commit 5413017

Browse files
committed
Adjusted ZIP parsing
1 parent 46b1548 commit 5413017

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/viewer.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,25 @@ export class Viewer {
216216

217217
load(url, rootPath, assetMap) {
218218
const baseURL = LoaderUtils.extractUrlBase(url);
219-
const isS3SignedUrl = this.isS3SignedUrl(url);
220219
const isZip = this.isZipFile(url);
220+
const isS3SignedUrl = this.isS3SignedUrl(url);
221+
222+
console.log('File detection:', {
223+
url: url.substring(0, 200) + '...',
224+
isZip,
225+
isS3SignedUrl,
226+
urlEndsWithZip: url.toLowerCase().endsWith('.zip')
227+
});
221228

222-
// For ZIP files, use ZIP loading approach
229+
// For ZIP files, use ZIP loading approach (priority over S3 detection)
223230
if (isZip) {
231+
console.log('Using ZIP loading approach');
224232
return this.loadZipFile(url, rootPath, assetMap);
225233
}
226234

227235
// For S3 signed URLs, use a custom loading approach
228236
if (isS3SignedUrl) {
237+
console.log('Using S3 loading approach');
229238
return this.loadS3SignedUrl(url, rootPath, assetMap);
230239
}
231240

0 commit comments

Comments
 (0)