This project is read-only.

Download attachment

Dec 22, 2011 at 5:58 AM

Hey All,

Need help regarding providing a download option for downloading a pdf file.

I want to provide a link in my site, to download a PDF file. please help me with info regarding modules that can do or how to do it....

Thanx in advance... hoping to hear soon about this


Issue critical!!!!!


Naresh Kumar

Dec 22, 2011 at 8:51 AM

Have you installed the MediaGarden.Documents module?

Jan 3, 2012 at 6:29 AM

Hey pete!

ya i have installed it. But i don't see any walk throughs on how to go about it

Jan 3, 2012 at 8:54 AM

When i installed the MediaGarden module and enabled it, My site throws out custom error and fails to load.

Eventually i have to manually delete the module form the Modules folder and my site is back in action.

Any other suggestions are most welcome!!!

Jan 3, 2012 at 11:47 AM

You also need to install Mechanics and Origami from Science Project (

Jan 4, 2012 at 7:21 AM

Hey Pete!

I installed Mechanics and origami modules, following which i installed media garden doumnets, it threw an error stating the media grden module was not in place so i installed it. after instaling media garden, now i am facing a new problem,another error and  it is asking me to install all 6 of media garden modules. I am quite skeptical now as to why so many mosules for a single purpose


Jan 4, 2012 at 7:40 AM

Hey Pete!

I have managed to install all the modules it asked for and enabled it. Please now guide me on how to use it to provide a downlaod link for my PDF file!!!



Jan 4, 2012 at 1:07 PM

Regarding your first question, technically you only need MediaGarden + MediaGarden.Documents. Perhaps you have seen in the documentation where it describes how to install all the modules - that method is only if you want everything, or for during development when it's an easier way to keep an up-to-date source enlistment by linking the folders.

Hopefully in the future Orchard will allow us to automatically install dependencies and then none of this will be a noticable problem - you'd just install Documents and everything else would happen for you. Unfortunately that isn't possible yet :(

The Origami dependency is absolutely crucial - it's used for building the UI on the "Sources" page, it makes it easy to have multiple objects on one page with editable form elements.

I managed to avoid a Mechanics dependency in the core MediaGarden project, but it's absolutely needed for your specific purpose - attachments. Mechanics is a framework for creating n:n content relationships. So the Documents module simply uses this to define a relationship to attach "Document" to "Page". Actually the Documents module is extremely simple and has very little code (as are most of the MediaGarden modules except the core library).

The reason I'm explaining all this is because it'll help you understand how the document links work and how to use them (and how to use the same kind of thing in all sorts of other scenarios).

The workflow is:

- Media Garden turns your files into content items. This is done from the "Media Garden" admin menu - you can either upload a file, enter a media path, or even enter an external Url. This is explain in Media Garden documentation:

- Enable the "Attachments" feature (which is part of the MediaGarden.Documents module). This will create an "Attachment" connector type which by default is allowed for Page and BlogPost content. So when you edit a Page or BlogPost you will see a set of checkboxes for which Document content you want to attach. If you want to attach to any other content types, you can do so in Content Types by editing the "Attachment" content type. To understand more about Mechanics connectors and configuration you can see the Science Project documentation:

Please let me know if you need any more specific help or if you have any questions from the documentation! (It's still badly in need of some improvement...)


Jan 6, 2012 at 6:00 AM


I am extremely sorry to bother you yet again.

I have a feeling that i am doing something very worng here.

Since i faced a problem with the modules, i re-installed the modules in the following order

-Media Garden

To be noted at this point, i got the same error agin stating the audio, video, and two other modules are not in place so i downloaded them manually and placed them in the modules folder.

I see the modules appear in the Modules section of the Dashboard with the menus on LHS.

I go to media Garden and enter * and press the Enter key. nothing happens

i manually upload the pdf file to media folder and i see the pdf in media section yet media garden fails to retrieve it.

None of the options and appraoches mentioned in the documentation are working at my end.

I am extrememly sorry but I am failing at this.

any Suggestions?


Jan 6, 2012 at 12:05 PM

What exactly is the error about the audio, video, and other two modules? I'm not sure where that should be coming from (and it sounds like a mistake on my part!)

After you uploaded the pdf to media folder, then if you enter * in the media query, do you see the file listed?

If this still isn't working I'll need to update the versions on the gallery, they are a bit out-of-date.