Though i would diffidently put the file in webroot to save server resources
and perhaps yet better i would try to put it in a CDN but if you would like
to serve the file the way you described, have you written [*header*
("Content-Type: *video*/x-ms-wmv");] before you send the file back to
client.On Mon, Oct 3, 2011 at 11:03 AM, thomaus <[email protected]> wrote: > Hi there, > > I'm experiencing a very strange problem. I'm trying to remotely > download a video file. > > I've done a very basic PHP code using the readfile() function. This > code works absolutely fine. > > Now when I copy / paste the exact same code into my CakePHP > controller, the URL works, a file is actually downloaded, the size of > the downloaded file is correct, but the type of the file is not > recognized, i.e. the video can't be played. > I tried the same with a mp3 file, just to check if the problem was not > a video format one, and the same problem happened. And again the > original PHP code is working fine with this mp3 file. > > I have added these 3 lines just in case in my controller : > Configure::write('debug', 0); > $this->autoLayout = false; > $this->autoRender = false; > but the same problem happens. > > Any idea? > > -- > 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 > -- 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
