Skip to content

Commit f623fb3

Browse files
committed
Fix issue with missing filename in the postback request
Update the readme file
1 parent 0e25123 commit f623fb3

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.1.1] - 2020-06-24
8+
### Fixed
9+
- Filename was not attached in the formbody of the postback request.
10+
711
## [0.1.0] - 2020-06-17
812
### Added
913
- Initial Support for PDF Print API

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repository provides a simple api wrapper for puppeteer (the nodejs way to interact with google chrome headless). It also provides some functions to include it into a given application landscape (like creating the pdf and sending it back to a given endpoint of choice).
44

5-
The [CHANGLOG](CHANGLOG.md) gives you information
5+
The [CHANGELOG](CHANGELOG.md) gives you information
66

77
## Installation
88

@@ -148,6 +148,3 @@ services:
148148
## Security Vulnerabilities
149149
150150
If you discover a security vulnerability within this application, please send an e-mail to Manuel Pirker-Ihl via [manuel.pirker-ihl@ambersive.com](mailto:manuel.pirker-ihl@ambersive.com). All security vulnerabilities will be promptly addressed.
151-
152-
## TODOS
153-
- Provide tests for the endpoints

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "print-api",
3-
"version": "0.1.0",
4-
"description": "",
5-
"author": "",
3+
"version": "0.1.1",
4+
"description": "This application allows you to create pdf documents of webpages and posting them to a prefered server/endpoint.",
5+
"author": "Manuel Pirker Ihl<manuel.pirker-ihl@ambersive.com>",
66
"private": true,
7-
"license": "UNLICENSED",
7+
"license": "MIT",
88
"scripts": {
99
"prebuild": "rimraf dist",
1010
"build": "nest build",

src/browser/browser.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export class BrowserService {
6868
const formData = new FormData();
6969
formData.append("file", fileForTransmission, `${filename}.pdf`);
7070

71+
if (session.filename !== undefined) {
72+
formData.append("filename", session.filename);
73+
}
74+
7175
if (session.postBackBody) {
7276
formData.append("data", session.postBackBody ? JSON.stringify(session.postBackBody) : {});
7377
}

0 commit comments

Comments
 (0)