If you're doing what I think you are, then you're trying to save the
contents of the file itself into a blob field of your database.
However, your first example seems to be inserting the file*name* of the
file into your blob field. You need the binary data of the file itself
and store it in your table. Something like:

$file = file_get_contents($filename);
$this->model->saveField('image', $file);

Now all of the binary data will be stored in a blob in your table
(don't let the skeptics scare you away from this approach, I've seen
benchmarks that show blobbing images into a database is *faster* than
finding the location in the database, then reading the data from the
filesystem). And it'll probably help to keep track of the image's MIME
content-type with another table column if you're going to have a PHP
script that outputs the blob field data.

I hope that helps :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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