-
Notifications
You must be signed in to change notification settings - Fork 74
Fixes: [T348188] For PDL, download and stream the PDF if available #186
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
Fixes: [T348188] For PDL, download and stream the PDF if available #186
Conversation
bull/pdl-queue/consumer.js
Outdated
| const IAuri = `http://s3.us.archive.org/${bucketTitle}/${bucketTitle}_images.zip`; | ||
| metadata = _.omit(metadata, "coverImage"); | ||
| let headers = setHeaders(metadata, byteLength, metadata.title); | ||
| let headers = setHeaders(metadata, byteLength, metadata.title, zip); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "zip" should be in string.
- I think it's better you directly send the content type so that you don't need to do another check in the
setHeaders()function.
bull/pdl-queue/consumer.js
Outdated
| const requestURI = request(job.data.uri); | ||
| const bucketTitle = metadata.IAIdentifier; | ||
| const IAuri = `http://s3.us.archive.org/${bucketTitle}/${bucketTitle}.pdf`; | ||
| let headers = setHeaders(metadata, responseSize, metadata.title, pdf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "pdf" should be in string.
- I think it's better you directly send the content type so that you don't need to do another check in the
setHeaders()function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made the requested changes
|
@shreyashidabral This PR is failing for me with the below error: I tried uploading this book from PDL. |
coderwassananmol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shreyashidabral The new changes are failing with this error. Please fix and resubmit.
|
Closing this since #224 is being worked upon. |

Fixes: T348188
Changes Made
Files Updated