Displaying files inline
Configure Files to display files inline
instead of as attachments.
This is useful when you use the Files API to download and display
active content, such as Adobe® Flash
(.swf) files, in your own HTML pages. Enable inline display by changing
a configuration property in the files-config.xml
file.
Then set the inline parameter to true in
your download requests.
Before you begin
To edit configuration files, you must use the IBM® WebSphere® Application Server wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.
About this task
By default, the IBM Connections server passes Files application files to browsers with the header "Content-Disposition: attachment." This means files display as attachments; when users click the attachment they are prompted to open or download the file. It also prevents embedding files. If you want to embed files in your own HTML page using an <embed> tag, the content disposition must be inline. This affects active content, such as Adobe Flash (.swf), and HTML pages referenced with <iframe>.
Configure a property in files-config.xml
to
change the content disposition from attachment to inline. Then set
the inline parameter to true in
your Files API download requests.
Important: Files uses the attachment disposition for security reasons. Specifically, uploaded files could potentially contain malicious code that can exploit the cross-site scripting vulnerabilities of some browsers. If you switch to inline disposition, you should configure an alternate domain download for greater security. See Mitigating a cross site scripting attack.