mariano: Well. The empty data field must have been something I had
changed when debugging. It turned out that I just needed to run
stripslashes when downloading the image.

Regards.
Asbjørn.

        function download($id) {
            $file = $this->File->findById($id);

            header('Content-type: ' . $file['File']['type']);
            header('Content-length: ' . $file['File']['size']);


                        header('Content-Disposition: attachment;
filename='.$file['File']['name']);

            echo stripslashes($file['File']['data']);
                        exit();
        }

On Oct 5, 5:42 pm, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Well yes, storing files on the local file system would solve you the issue.
> But it should be interesting to debug why the data field is not being
> filled.
>
> -MI
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
> Of [EMAIL PROTECTED]
> Sent: Thursday, October 05, 2006 6:10 AM
> To: Cake PHP
> Subject: Re: corrupted files
>
> nate: I am using cake 1.1.8 - where can I find the latest information about
> how to do that? No information in wiki and bakery..
>
> mariano: Tried it, no difference. I don't think it is a cake problem.
> It was working fine with my testing environment. (xampp on windows) But
> after I uploaded my app to my ISP b-one. I get alll kind of problems. Just
> looked at the tables with phpmyadmin and the data field is empty! That must
> be the problem.. Maybe I should start storing files on the local file
> system..?
>
> Code:http://www.cakephp.org/pastes/show/8f13c5bf52c8d2ed6de70b7fe18b49aa
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.407 / Virus Database: 268.12.13/463 - Release Date: 10/4/2006
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.407 / Virus Database: 268.12.13/463 - Release Date: 10/4/2006


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to