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?
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>
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
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:
is working on a reply...