This project is read-only.

mdo:transfer( virtual-path )

This extension stops processing of current module and calls Server.TransferRequest (requires the integrated pipeline mode of IIS 7.0.).

This also work inside <mdo:service /> block and allows you to shorten urls and return binary data from XsltDb services

<img src="{mdo:service-url('image')&amp;id=123}" />

<mdo:service name="image">
  <xsl:variable name="image-path"
     select="mdo:sql('select Path from Images where ID = @id', '$scalar', '@id', mdo:request('id'))" />
  <xsl:execute select="mdo:transfer($image-path)" />

This allows you to add logics to URLs that returns binary data. You can:
  • return images by ID, keep actual image path in secret
  • return different files basing on user status (i.g. don't add watermark for premium users)
  • choose what content type to use (i.g. you can choose SWF or JPEG by transferring to file with smaler size. (You must have both on disk of course)).

Last edited Dec 11, 2010 at 4:42 PM by findy, version 1


No comments yet.