Oracle WebCenter Sites BlobServer Content Type & Content-Disposition Response Header Issues

Usually we can control what happens when a user clicks on a blobserver URL , i.e if user wants the blob to be opened inline in the browser (Ex: PDF) , we can provide the additional arguments with render:getbloburl tag which allows user to set the response headers that blob server will send with blob , such as Content –Type and and Content-Disposition to control how the browser handles the blob.

Example :

<!– provide other params like blobtable, blobkey, etc… –>
<render:argument name=”blobheadername1″ value=’Content-Type’ />
<render:argument name=”blobheadervalue1″ value=’application/pdf’ /> 
<render:argument name=”blobheadername2″ value=’Content-Disposition’ />
<render:argument name=”blobheadervalue2″ value=’attachment; filename=MyFile.pdf’ />

Additional Notes : With IE 7 & IE 8 , you might encounter “The requested site is either unavailable or cannot be found. Please try again later.” errors which can be avoided using additional Cache-Control header information as given below

  <render:argument name=”blobheadername1″ value=”Cache-Control”/>

  <render:argument name=”blobheadervalue1″ value=”private”/>

render:getbloburl without Content-Type or Content-Disposition

There might be cases where no additional information related Content Type or Content –Disposition was provided . So how WebCenter Sites handles in this case?

With WebCenter Sites – and later when making a request to BlobServer without ContentType and Content Disposition , Content-Disposition by default gets set to attachment; filename=”{filename}”;filename*=UTF-8””{filename}””.

This causes the browser to prompt the user to download the blob instead of opening the blob in browser.

Earlier version of WebCenter Sites (Fatwire) treats these cases differently. So with WebCenter Sits or later you might encounter certain issues like Flash Player not working (Flash movies not playing which were playing in Fatwire without any issues ) etc..

So to resolve these issues while building the blob URL provide the additional header values as arguments by overriding the default Content-Disposition and clear the cache to make it work.

<render:argument name=”blobheadername1″ value=”Content-Disposition”/>
  < render:argument name=”blobheadervalue1″ value=”inline”/>


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s