Copied to clipboard

Flag this post as spam?

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


  • Jason Espin 368 posts 1335 karma points
    Apr 15, 2014 @ 11:02
    Jason Espin
    0

    Uploading a file that is available to download through a content page

    Hi all,

    I wish to allow my users to upload a file to my homepage that will then be available as a link allowing users of the front-end to download the file. How would I go about doing this in Umbraco 7.1.1 using a Razor partial view?

    Jason

  • Jason Espin 368 posts 1335 karma points
    Apr 15, 2014 @ 11:21
    Jason Espin
    100

    Never mind, I solved this myself. Firstly I created an upload field within my homepage document type that allows the back office user to upload a document. I then used the following code snippet to allow front-end users to download the document:

    @{
            var homepage = CurrentPage.AncestorsOrSelf(1).First();
     }
            <a href="@homepage.brochure" target="_blank">Download Brochure</a>
    
Please Sign in or register to post replies

Write your reply to:

Draft