Skip to content

Commit dfee11f

Browse files
committed
updated: examples
1 parent 756e736 commit dfee11f

9 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎download-file-counter/controllers/default.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports.install = function(framework) {
1414

1515
function view_homepage() {
1616
var self = this;
17-
self.plain(self.req.hostname('/company-profile.pdf') + '\n\nDownload count: ' + counter);
17+
self.plain(self.req.hostname('/totaljs.pdf') + '\n\nDownload count: ' + counter);
1818
};
1919

2020
function file_download(req, res, isValidation) {
-544 KB
Binary file not shown.
18.2 KB
Binary file not shown.

‎download-file/controllers/default.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports.install = function(framework) {
55

66
function file_download() {
77
// Documentation: http://docs.totaljs.com/FrameworkController/#controller.file
8-
this.file('company-profile.pdf', 'about-us.pdf');
8+
this.file('totaljs.pdf', 'logo.pdf');
99
}
1010

1111
function image_download() {
-544 KB
Binary file not shown.

‎download-file/public/totaljs.pdf‎

18.2 KB
Binary file not shown.

‎download-stream/controllers/default.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ exports.install = function(framework) {
66

77
function file_download() {
88
var self = this;
9-
// Documentation: http://docs.totaljs.com/Framework/#framework.responseStream
10-
self.stream('application/pdf', fs.createReadStream(self.path.public('company-profile.pdf')), 'about-us.pdf');
9+
// Documentation: http://docs.totaljs.com/FrameworkController/#controller.stream
10+
self.stream('application/pdf', fs.createReadStream(self.path.public('totaljs.pdf')), 'logo.pdf');
1111
}
-544 KB
Binary file not shown.

‎download-stream/public/totaljs.pdf‎

18.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)