Open doctrinebot opened 10 years ago
Comment created by gustavomr:
trying to insert this image
Comment created by gustavomr:
Using: $entityManager->getConnection()->getConfiguration()->setSQLLogger( new Doctrine\DBAL\Logging\EchoSQLLogger());
Getting: "START TRANSACTION" INSERT INTO Upload (name, type, size, content) VALUES (?, ?, ?, ?) array(4) { [1] => string(5) "a.png" [2] => string(9) "image/png" [3] => int(264547) [4] => string(270342) "‰PNG \0\0\0 IHDR\0\0@\0\0„\0\0\0v/jõ\0\0\0sBITÛáOà\0\0\0tEXtSoftware\0gnome-screenshotï¿>\0\0 \0IDATxœìw](TÅöÀÏܲ{·$›I¥“Лҫ€ QPô©`{êÏγ÷ŸýYÀ‚ˆ\"¢ô %½m’í햙ߛ,›mÙe¾>š½÷Ι™3gæÎœ;)3ÿR P( …B¡P( …\0\0³X¾Ÿ†X]ŸÞ]ÿÂôP(\0àÜnñ¯N…B¡P( …B¡P(„B\0\0.÷ñ’ÊüünݺÇøîÚl¶m;æçfh4\0@BUR)”3®©šR( …B¡P( …ræa2Y«ëV\0@4……}Y–<¸§×KEÙ±ãHaaßâ¢#n·\0Ãf¦§ÄÇÇþÅé¦PÎ0¨‹B¡P( …B¡P(g(„ÙttTJ5\"\0< g§æefe¥ú?3rd¿Š £V.W7ì&\0˜âF‰ø%9uÆF\0HINø«pôx…ZÅuÉL¥“Ô(‘Ù³¯\0ú÷í}ã¶9°A‡Óãr¥Åé¯n"... } array(4) { [1] => string(6) "string" [2] => string(6) "string" [3] => string(7) "integer" [4] => string(4) "blob" } "COMMIT"
Comment created by @deeky666:
This looks more like a DBAL issue. Can you please provide the error/exception message that you receive from the driver/database server? Also do you use PDOMySQL or mysqli driver?
Comment created by gustavomr:
Steve,
I'm not getting any error/expection. Table looks like insert the blob file but when I try to download it is corrupted. You could see at getting .zip file and executing it.
I'm using PDOMysql.
Comment created by @ocramius:
This would probably need a data sample to reproduce the issue.
Comment created by gustavomr:
Marco,
you could use project attached and image in order to reproduce.
Comment created by @ocramius:
[~gustavomr] you should actually provide a functional test for this in case, see https://github.com/doctrine/dbal/tree/master/tests/Doctrine/Tests/DBAL
For example, the zip file you uploaded fails on various includes, and doesn't show the failures to me.
Jira issue originally created by user gustavomr:
I have an entity mapped as:
When I use this (WORKS)
When I use this doctrine way (NOT WORKING, if you try to get this file from mysql, return a corrupted or empty file)
My html file: