Skip to content

Add handlebars helper to convert to base64#1

Open
maillouxc wants to merge 1 commit intomasterfrom
maillouxc-base64-1
Open

Add handlebars helper to convert to base64#1
maillouxc wants to merge 1 commit intomasterfrom
maillouxc-base64-1

Conversation

@maillouxc
Copy link
Owner

Usage sample

{
"file": "{{#base64}} FirstName,LastName,CountryCode {{newLine}} {{# repeat 10 comma=false}}{{ faker 'name.firstName' }},{{ faker 'name.lastName' }},{{ faker 'address.countryCode' }} {{newLine}} {{/ repeat}}{{/base64}}"
}

Related Issue

Issue: mockoon#331

Motivation and Context

We wanted to be able to return a dynamically generated base64 encoded CSV file

How Has This Been Tested?

Tested using the sample input above.

Closes mockoon#331

Usage sample:

{
  "file": "{{#base64}} FirstName,LastName,CountryCode {{newLine}} {{# repeat  10 comma=false}}{{ faker 'name.firstName' }},{{ faker 'name.lastName' }},{{ faker 'address.countryCode' }} {{newLine}} {{/ repeat}}{{/base64}}"
}
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.

Handlebars helper to convert to base64

1 participant