heidi, The message seems pretty clear, the folder you're requesting does not exist. But what's wrong with your request. It's a bit mysterious because your code looks like sample values and the message looks like a real message. The path named in the message doesn't remotely look like something you'd get when running your code.
You'd expect '/DTAfiles/something.something was onto found on the server'. So, where is this 'members/download' path coming from? You could search your code or data tables to figure out what is creating the path 'members/download/...' I can see one error in your code though. Your 'path' parameter should not have the file name stuck on the end of it. See the examples: http://book.cakephp.org/view/1094/Media-Views Regards, Don On May 4, 1:25 am, heohni <[email protected]> wrote: > hi, > > I have an action to create a txt file and write stuff into. > Then I redirect to another action, where I have a simple template with > a download button. > On click, I would like to download the txt file, the name of the file > I pass within the url to the download function. > > function download(){ > $this->view = 'Media'; > $params = array( > 'id' => $this->params['named']['do'].'.txt', > 'name' => 'example', > 'extension' => 'txt', > 'mimeType' => array('txt' => 'text/plain'), // extends > internal list of mimeTypes > 'path' => WWW_ROOT.'/DTAfiles/'.$this->params['named'] > ['do'].'.txt' > ); > $this->set($params); > > } > > But I get the message > Not Found > Error: The requested address '/members/download/040520111017' was not > found on this server. > > I dont understand why this isn't working, what do I do wrong? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
