Support downloading excel and csv responses with content disposition attachment header#2274
Open
LauraXiulan wants to merge 210 commits intoAzure:masterfrom
Open
Support downloading excel and csv responses with content disposition attachment header#2274LauraXiulan wants to merge 210 commits intoAzure:masterfrom
LauraXiulan wants to merge 210 commits intoAzure:masterfrom
Conversation
Azure#1584) * Create mainCI.yml Work in progress, don't merge * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * added script for build website * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Fixed color contrast accessibility issues * Fixed ari-roles issues * added static storage wip * Added missing static data * Update mainCI.yml * added static data for requests made at publishing time * updated PublisherStaticDataProvider * updated PublisherStaticDataProvider * updated PublisherStaticDataProvider * get data from default.json too * added build-static-data script * refactoring * removed logs * removed some headers from static data * removed headers * added smaller GraphQL api * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * Update mainCI.yml * test accessibility on profile * Update mainCI.yml * Update mainCI.yml * removed headers * test with pre-populated e-mail and password * compacted json files * removed test e-mail and password * code review changes * test for signed in version * added default.json and defaultMockData.json only for staticData * fixed webpack configs * fixed accessibility issues * fixed accessibility issues * added staticDataEnviroment constant * Update mainCI.yml * removed logs * renamed defaultMockData.json
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…enerate.js (Azure#1675) > @azaslonov Thank you for accepting the PR. Not sure why the build failed. It appears not related to my changes. Any insights? This is accessibility check, doesn't seem to be related to your PR. @malincrist, do you mind taking a look?
… other minor improvements (Azure#1681)
* Added support for union types in the graphql console * Removing hardcoding and using constant values from the graphql library
Implementation inspired by Azure#1621 Co-authored-by: Jonas Anker Rasmussen <jra@cvation.com>
* Add "API: Products (dropdown)" widget Closes Azure#1177 * Update src/components/apis/api-products/ko/runtime/api-products-dropdown.ts Avoid assigning undefined to undefined Co-authored-by: Rafał Mielowski <rmielowski@microsoft.com> * Remove unnecessary function called in the next line by other function Co-authored-by: Rafał Mielowski <rmielowski@microsoft.com>
… the "send" button from the test console (Azure#1704)
* Supporting graphql subscriptions * Adding improvements and style variables to the gql console.
…zure#2190) * Made page content section stretch by default for all viewport sizes * stretch by default for home layout as well
* Replace deprecated methods from cred generation Co-authored-by: Farhad Alizada <falizada@microsoft.com>
…)" (Azure#2193) This reverts commit ef4b854.
* added pagination for user subscriptions * lint fix
* Fixed scroll to operation in operation details * use id instead of class; fixed for graphql
Co-authored-by: Farhad Alizada <falizada@microsoft.com>
Co-authored-by: Farhad Alizada <falizada@microsoft.com>
* Removed duplicated styles
* Add dropdown for the case when there are multiple examples --------- Co-authored-by: Farhad Alizada <falizada@microsoft.com>
…est run (Azure#2209) * Remove no needed async and wait for the server listen event before test run * Listen to console errors in tests * Use node 18 * Add incognito option for browser * Clear user directory before test start --------- Co-authored-by: Farhad Alizada <falizada@microsoft.com>
Co-authored-by: Alexander Zaslonov <alzaslon@microsoft.com> Co-authored-by: Farhad Alizada <falizada@microsoft.com>
Co-authored-by: Farhad Alizada <falizada@microsoft.com>
* Add Playwright tests with image comparison for profile page --------- Co-authored-by: Farhad Alizada <falizada@microsoft.com>
…attachment header.
Author
|
@microsoft-github-policy-service agree |
Author
optyingale
approved these changes
Oct 25, 2023
optyingale
approved these changes
Oct 25, 2023
Author
|
Nice addition, we sometimes have the intent to download other content types. Eg. a very large JSON file for example. E.g xml, text, json, jsonc, etc ... header('Content-Disposition: attachment; filename=data.json'); Would be amazing thanks ! |
79dae19 to
a74f7db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When retrieving an CSV or EXCEL file as response in the Developer Portal, the response is shown inline, which makes it unreadable. This PR adds logic to download these kinds of responses instead.
Suggestions, remarks and edits are welcome. I tested the code locally for our own APIM by temporary switching to Self-Hosted.
I have only added CSV and EXCEL in this PR, but I can imagine a usecase for PDF's as well.