Skip to content

Commit

Permalink
feat(archive): Add archive loader to prepare for conversion feature f…
Browse files Browse the repository at this point in the history
…lip (#1137)
  • Loading branch information
Mingze authored and mergify[bot] committed Jan 2, 2020
1 parent bead32b commit 0250432
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/__tests__/Preview-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2420,7 +2420,7 @@ describe('lib/Preview', () => {
stubs.getHeaders = sandbox.stub(util, 'getHeaders');
stubs.headers = {
'X-Rep-Hints':
'[3d][pdf][text][mp3][jpg?dimensions=1024x1024&paged=false][jpg?dimensions=2048x2048,png?dimensions=2048x2048]',
'[3d][pdf][text][mp3][json][jpg?dimensions=1024x1024&paged=false][jpg?dimensions=2048x2048,png?dimensions=2048x2048]',
};

preview.options.sharedLink = 'link';
Expand Down
3 changes: 1 addition & 2 deletions src/lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ export const STATUS_SUCCESS = 'success';
export const STATUS_VIEWABLE = 'viewable';

// X-Rep-Hints for Representations API
export const X_REP_HINT_ARCHIVE = '[json]';
export const X_REP_HINT_BASE = '[3d][pdf][text][mp3]';
export const X_REP_HINT_BASE = '[3d][pdf][text][mp3][json]';
export const X_REP_HINT_DOC_THUMBNAIL = '[jpg?dimensions=1024x1024&paged=false]';
export const X_REP_HINT_IMAGE = '[jpg?dimensions=2048x2048,png?dimensions=2048x2048]';
export const X_REP_HINT_VIDEO_DASH = '[dash,mp4][filmstrip]';
Expand Down
2 changes: 2 additions & 0 deletions src/lib/loaders.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ArchiveLoader from './viewers/archive/ArchiveLoader';
import ImageLoader from './viewers/image/ImageLoader';
import Image360Loader from './viewers/box3d/image360/Image360Loader';
import SWFLoader from './viewers/swf/SWFLoader';
Expand All @@ -11,6 +12,7 @@ import OfficeLoader from './viewers/office/OfficeLoader';

// Order in this list matters
export default [
ArchiveLoader,
TextLoader, // should come before document
OfficeLoader, // should come before document
DocLoader, // should come after text
Expand Down

0 comments on commit 0250432

Please sign in to comment.