简体   繁体   中英

Symfony - uploading images and saving as blob

I'm using SF1.4 and Propel and I'm having a slight problem with trying to save images to a field in my database.

Does anyone have a small example that I could work from?

Keep your images in a filesystem. Is there a special reason to store images in a db ? You can store only generated filename. Because storing blobs in mysql will freeze your application. Give this task to a webserver.

I've had a bad experience saving images as blobs. Specially when you have to change your database engine. But if you still want to go that way. I found this useful http://oldforum.symfony-project.org/index.php/t/25699/ though its based on Doctrine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM