Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
root
Creator II
Creator II

Host static files

Is it possible for me to use Talend Runtime container as a way to host "static" content like images/ html/ pdf? 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Here is a very basic example that will allow you to do this. The layout of the job is shown in the screenshot below.

0683p000009MAh4.png

The configuration of the tFileInputRaw is below....

0683p000009MAr7.png

The tConvertType component converts the output from the tFileInputRaw from Object to byte[].

The tRestResponse is configured as below...

 

0683p000009MAnQ.png

On the Advanced Settings tab you need to set some Response Headers.....

0683p000009MApb.png

 

When you run the service and call it through a browser, it will return your file.

View solution in original post

4 Replies
Anonymous
Not applicable

How do you mean "host"? Do you want them to be available via the Runtime in the same way they would be via a Web Server?

root
Creator II
Creator II
Author

@rhall. Yes, that is correct. I do not want to spin off a new web server instance just to host a couple of static files.
Anonymous
Not applicable

Here is a very basic example that will allow you to do this. The layout of the job is shown in the screenshot below.

0683p000009MAh4.png

The configuration of the tFileInputRaw is below....

0683p000009MAr7.png

The tConvertType component converts the output from the tFileInputRaw from Object to byte[].

The tRestResponse is configured as below...

 

0683p000009MAnQ.png

On the Advanced Settings tab you need to set some Response Headers.....

0683p000009MApb.png

 

When you run the service and call it through a browser, it will return your file.

root
Creator II
Creator II
Author

Super. This is awesome. Thanks!