Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anil 9 posts 29 karma points
    Mar 21, 2011 @ 14:31
    Anil
    0

    Need help on upload and download files !!

    I am a newbie and need urgent help on upload and download files using umbraco. I have uploaded few files using Media under sections panel. Now, I want to provide as many download links to the users as much the number of files are under Media folder.

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 21, 2011 @ 15:17
    Jan Skovgaard
    0

    Hi Anil

    For uploading files into Umbraco I think you should have a look at the desktop media uploader if you have many files you need to upload, since doing it manually can be a very tedious and time-consuming task.

    To make a download link is another matter.

    Have you setup some document types in the settings section, which you're using for creating content nodes in the content section? And how are the files represented in your site? Should they all a part of a list with downloads on a page on the website or how is it supposed to be working?

    /Jan

  • Anil 9 posts 29 karma points
    Mar 22, 2011 @ 06:25
    Anil
    0

    Jan,

    Uploading files looks easy task but for downloading, I am using a macro and then trying to refer that macro inside <a></a>(hyperlink). don't know if this is the correct way to achieve this. I am getting the link on one of my content page, but it doesn't start download at all. Can you give me a step by step example or procedure for downloading file. Thanks

  • Anil 9 posts 29 karma points
    Mar 22, 2011 @ 13:29
    Anil
    0

    There are some improvements which I would like to add here: created one XSLT

    <xsl:template match="/">

    <xsl:variable name="mediaFolder" select="umbraco.library:GetMedia(1051, 1)" /> 

    <ul> 
      
    <xsl:for-each select="$mediaFolder/*">       
      <li>
               <li>    
          <a href="{current()/data [@alias='umbracoFile']}">                  
          <xsl:value-of select="current()/@nodeName" /></a>                         
       </li>
      </li>       
    </xsl:for-each>     
    </ul>
    </xsl:template>

    This lists all of my images in the given folder, 1051. But I am still wondering, how do I get a secured way of downloading files, also when I click on any of the link it doesn't popup a download dialog. Any suggestions.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 02, 2011 @ 10:47
    Jan Skovgaard
    0

    Hi Anil

    Sorry for my late reply.

    When you say secured way of downloading then what are you thinking about exactly? Do you want to make sure only logged in members can download the files? If so it can be handled by using "public access" on the nodes in Umbraco. In combination with the "protected media" package by Richard Soeteman it should be possible to ensure that no one that's not allowed to acces the files can get hold of them.

    To open the links in blank window you can add the target attribute on your anchor....so it looks like this

    <a href="{current()/data[@alias='umbracoFile']}" target="_blank">

    Hope this helps.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft