Are you using cake2.x? Then do it using the controller's response object
http://book.cakephp.org/2.0/en/controllers/request-response.html#cakeresponse
And force the download, using file() and download => true.

Note, that if you don't force the download, the browsers need the last part 
of the url to determine the actual filename
See http://www.dereuromark.de/2011/11/21/serving-views-as-files-in-cake2/


Am Freitag, 20. September 2013 15:53:18 UTC+2 schrieb 
[email protected]:
>
> Hi,
>    Iam storing file details in database as
>     file_url====>\files\abc\1379652679.jpg
>     file_ext====>jpg
>     file_name===>Lighthouse.jpg
>     file_uuid====>1379652679.jpg
> (file_url,file_ext,file_name,file_uuid are database columns)
> And my problem is when iam downloading file by using media view class am 
> not able to downolad with file_url as \files\abc\1379652679.jpg .if i take 
> file_url as \files\abc\  it going success.please provide complete solution 
> with medial view class by using file url as 
> \files\abc\1379652679.jpg.
>
>
> Thank you
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to