Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Add gzip encoding param to pdf reps #845

Merged

Conversation

JustinHoldstock
Copy link
Contributor

No description provided.

@boxcla
Copy link

boxcla commented Sep 24, 2018

Verified that @JustinHoldstock has signed the CLA. Thanks for the pull request!

@JustinHoldstock JustinHoldstock changed the title Add gzip encoding param to pdf reps New: Add gzip encoding param to pdf reps Sep 24, 2018
src/lib/constants.js Outdated Show resolved Hide resolved
if (PDFJS.disableRange) {
const { url } = docInitParams;
docInitParams.url = appendQueryParams(url, {
[QUERY_PARAM_PDF_ENCODING]: PDFEncodingTypes.GZIP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the key/value pair is only used once, it can be declared inline. It doesn't look like we have any other encoding types.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could move this to before the docInitParams are set, then you can just pass this value in so you don't have to unpack it/modify a "const" object

@JustinHoldstock JustinHoldstock merged commit 5137a01 into box:master Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants