Friday 17 September 2010 4:19:42 am
If you only have a single attribute with the binary file in your content class, you might: 1) simple solution: use an http redirect 2) create a new fetch function and serve the binary content via template (hackish!) 3) create an alternative module to content/download for 1: override full.tpl for your class, in it just set a redirect_location in the persistent_variable that points to the correct :content/download/xxx link, and in the pagelayout check if redirect_location is set, and if it is, do an http redirect to it (needs a new tpl operator for it) for 2: override full.tpl for your class, in it set a file_location and mime_type in the persistent_variable; the again add code in the pagelayout that when those variables are found juset does a readfile() of the binary content and sends appropriate mime headers for 3: I'll leave it up to you to code the new module+view that looks up node id by path and then gets the binary file and pipes it to the user. Urls might look like /my/download/path/to/the/node - here again you should add rewrite rules / redirects to get to a "clean" solution
Principal Consultant International Business
Member of the Community Project Board
|