Comments (7)
@PatrickRose the toolbar should only interfere when the output is text/html
. Could you elaborate a bit on this issue?
Originally posted by @Ocramius at zendframework/zend-developer-tools#162 (comment)
from laminas-developer-tools.
I'd need to delve deep into our source code to try and find the issue involved with download (though I'll grab the person involved when they come in).
I can spot it in our API requests though, and although it's not a real issue there it does irk me slightly.
Originally posted by @PatrickRose at zendframework/zend-developer-tools#162 (comment)
from laminas-developer-tools.
Our download action uses the Zend\Http\Response\Stream
object to stream the contents of the file, and we set the Content-Type to application/x-gzip
.
Originally posted by @PatrickRose at zendframework/zend-developer-tools#162 (comment)
from laminas-developer-tools.
@PatrickRose Any update on this?
Originally posted by @moderndeveloperllc at zendframework/zend-developer-tools#162 (comment)
from laminas-developer-tools.
I no longer work at the place where I encountered - but a message to the staff there says its still an issue.
Originally posted by @PatrickRose at zendframework/zend-developer-tools#162 (comment)
from laminas-developer-tools.
Just downloading the ZF2 application skeleton and adding a download action to the index controller w/ the mentioned stream and type isn't enough to reproduce the issue. I had Zend Developer Tools installed via Composer and in the application config.
// This should be an array of module namespaces used in the application.
'modules' => array(
'Application',
'ZendDeveloperTools',
),
Here's the code I used when I attempted to reproduce this issue.
public function downloadAction()
{
$fileName = '/vagrant/somefile.tar.gz';
$basename = basename($fileName);
$response = new Stream();
$response->setStream(fopen($fileName, 'r'));
$response->setStatusCode(200);
$response->setStreamName($basename);
$headers = new Headers();
$headers->addHeaders(array(
'Content-Disposition' => 'attachment; filename="' . $basename . '"',
'Content-Type' => 'application/x-gzip',
'Content-Length' => filesize($fileName),
));
$response->setHeaders($headers);
return $response;
}
I managed to download a working .tar.gz
file. When I tested it using the answers in this StackOverflow question and compared it with various header parameters, the file still appeared to be fine when the Content-Disposition
parameter was properly specified.
Originally posted by @Barbarrosa at zendframework/zend-developer-tools#162 (comment)
from laminas-developer-tools.
I tried in latest laminas-developer-tools to download zip and tar.gz file, both working fine. I am closing it.
from laminas-developer-tools.
Related Issues (20)
- Uncaught exception 'Exception' with message 'Serialization of 'Closure' is not allowed' HOT 6
- ZendDeveloperTools conflicts with Zend\Code 2.3.1 and 2.2.7 HOT 3
- CSS box-sizing HOT 4
- Tooltip in icons to show info or show title HOT 2
- Incorrect Content-Lenght after toolbar injection HOT 1
- Feature: CSS Markup HOT 4
- ApplicationConfig unescaped HOT 9
- Modules list should have vertical scrolling HOT 1
- Should activate panels on click
- default template suffix HOT 5
- Implement FirePHP listener HOT 3
- Option to view queries / individual timing HOT 1
- Uncaught ReferenceError: Sfdump is not defined HOT 4
- Broken Whoops library when DeveloperTools module is enabled HOT 3
- PHP 8.0 support HOT 4
- Toolbar hidden will soon not be remembered because of cookie settings
- DeveloperTools fatal error when using named Adapters HOT 1
- Dependency Dashboard
- PHP 8.3 support HOT 1
- Wrong data type returned in implementation of serialization methods
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laminas-developer-tools.