The making of a download script
Based on the feedback on my little download script I'd like to share how I created it.
Step 1: Have a look at the database that hosts the downloads:
Step 2: Pick a view
Step 3: The same view as XML and all of it.
Step 4: Whip up some XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" indent="no"/>
<xsl:template match="/"><xsl:apply-templates /></xsl:template>
<xsl:template match="viewentries">REM Fetch all the Files<xsl:apply-templates /></xsl:template>
<xsl:template match="viewentry">if not exist <xsl:value-of select="entrydata/text"/>.pdf wget --user=yourname --password=yourpwd www.ls08.net/confapps/pdf.nsf/ceda8c2d1ee3648785256e1c000e1a47/<xsl:value-of select="@unid"/>/$file/<xsl:value-of select="entrydata/text"/>.pdf</xsl:template>
</xsl:stylesheet>
Step 5: Transform the view using your favorite XML tool.
- 


Comments
I'm a bit stuck trying to create a download button that works within flash (or dreamweaver) for a website I'm working on, what it is, is i want a roll over button which is going to be a pdf icon, placed somwhere on a flash stage, so that when uploaded the viewer on rollover is instructed to download my cv when clicked I would like my cv to then download onto there desktop? I can make the rollover button and place it on a stage I just cant figure out how to get it working/downloading??? any chance you could point me in the right direction, that would be loads of help,
Thanks,
Anthony.
Posted by anthony At 00:22:07 On 04/08/2008 | - Website - |