We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I run into a pretty odd issue. I have setup a local adapter, which works fine. I write into it without any issue.
But things get strange when I try to deliver the file through the BinaryFileResponse as Chrome complains about : ERR_CONTENT_LENGTH_MISMATCH
Here is how I ask for the file delivery (full details below);
$response = new BinaryFileResponse('gaufrette://stream/'.$track->getFilename(), 200, $headers, false);
The odd thing is that it works if I call the file directly with
$response = new BinaryFileResponse($streamDir.'/'.$track->getFilename(), 200, $headers, false);
I have checked the Content-length header in the BinaryFileResponse and it seems ok...
I am bit lost here and would appreciate any help on this.
Here is the gaufrette config:
knp_gaufrette: adapters: stream: local: directory: "%stream_directory%" create: true filesystems: stream: adapter: stream stream_wrapper: ~
And here is the code used by my controller to deliver the file:
$streamFileSystem = $this->get('knp_gaufrette.filesystem_map')->get('stream'); $map = StreamWrapper::getFilesystemMap(); $map->set('stream', $streamFileSystem); StreamWrapper::register(); // We prepare the headers of the response $headers = array( 'Content-Type' => 'audio/mpeg', 'Pragma' => 'no-cache', 'Transfer-Encoding' => 'none', 'Connection' => 'close', 'Accept-Ranges' => 'none', ); $response = new BinaryFileResponse('gaufrette://stream/'.$track->getFilename(), 200, $headers, false); return $response;
Note: I call the url directly, there is no HTML involved in this process.
The text was updated successfully, but these errors were encountered:
AntoineGonzalez
No branches or pull requests
Hello,
I run into a pretty odd issue.
I have setup a local adapter, which works fine. I write into it without any issue.
But things get strange when I try to deliver the file through the BinaryFileResponse as Chrome complains about : ERR_CONTENT_LENGTH_MISMATCH
Here is how I ask for the file delivery (full details below);
The odd thing is that it works if I call the file directly with
I have checked the Content-length header in the BinaryFileResponse and it seems ok...
I am bit lost here and would appreciate any help on this.
Here is the gaufrette config:
And here is the code used by my controller to deliver the file:
Note: I call the url directly, there is no HTML involved in this process.
The text was updated successfully, but these errors were encountered: