This is really strange. I can't figure this out at all.
I output converted image and video files but as soon as I output a
video I loose my session. Not so with images. Image files are often
larger than the videos (small 3sec 320x240 mp4) so it is not a timeout
of some kind.
show.ctp - does the following:
$filetype = mime_content_type($filename); // yes it exists and returns
things like "video/mp4"
//other headers here... removed for debugging
header("Content-Type: $filetype"); // this is the problem from what I
can figure out.
readfile($filename);
Configure::write('debug',0); // also tried exiting here, no difference
I also have other headers I set but now I have stripped it down for
debugging. outputting the file works. I get all the usual binary crap
in my browser... adding the content type will do one of two things:
output a "broken video" according to Quicktime, or if I "Auth->allow
()" the action I get the video playing but I am still logged out when
I refresh.
Remember that none of these problem happen with the same lines of code
outputting a png of jpg or gif... only the video "version" of the
original file causes the session to end. And then only if I set the
Content Type.
What is going on? Any ideas?
Info on the other parts:
DataFilesController - outputs converted image and video files.
DataFile - the model that stored meta-data in sql and handles
conversion from the original file-format to the requested file-
formats. The difference between image and video is only the converter
settings (ffmpeg).
DataFilesController::show()
Takes "filename" like id.ext (123.png for a png version of file id 123
in sql)
Asks the Model for the full server-path to the converted file and send
it off the the view.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment