Symfony 1.4 uploads FLV as EXE or BIN files
Problem:
Symfony uploading FLV files as BIN files (or sometimes EXE on Windows).
More Information:
Symfony has a big associated array of mime-types and file extensions, one that specifies 'application/octet-stream' as being associated with the file type BIN.
Solution:
I tried manually changing the sfValidatedFile.class.php file in lib/vendor/symfony/lib/validator/ but it didn't help. To solve this problem, I ended up manually checking the file's extension before and after upload and then correcting it if it was wrong. If I come up with a better solution, I will definitely post my findings.
Good luck.
2 comments