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

Provide buffer param for cloudfront provider #1188

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

dbauszus-glx
Copy link
Member

@dbauszus-glx dbauszus-glx commented Mar 20, 2024

The cloudfront endpoint returns either json or text from the fetch response.

Setting the buffer=true url parameter will return a buffer from the fetch response.

The buffer method is a member of the node-fetch module which must be required by the cloudfront module.

/api/provider/cloudfront?content_type=application/pdf&buffer=true&url={RESOURCES}/mapp_uk/userguide.pdf

The content_type must be set to application/pdf for the provider endpoint to set the response header with the buffer content.


@dbauszus-glx dbauszus-glx added the Feature New feature requests or changes to the behaviour or look of existing application features. label Mar 20, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@simon-leech simon-leech left a comment

Choose a reason for hiding this comment

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

This is working for me and deployed an instance in which its working too!

@RobAndrewHurst RobAndrewHurst merged commit 5edbce1 into GEOLYTIX:main Mar 21, 2024
5 checks passed
@dbauszus-glx dbauszus-glx deleted the cloudfront-buffer branch June 14, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature requests or changes to the behaviour or look of existing application features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants