Bug #64330
closeddumpFileContents does not work as intended when compression is enabled
0%
Description
I'm not really sure if this is a bug or a feature.
When you enable compression for the backend (e.g. [BE][compressionLevel] = 9), then dumpFileContents in TYPO3\CMS\Core\Resource\ResourceStorage does dump the given filecontent gzip compressed. Actually I would have supposed, that dumpFileContents always should just dump the content of the file and don't care about compression.
The following code can be used in an action of a backend module to test the problem.
$storage = $this->resourceFactory->getDefaultStorage(); $file = $storage->getFile('test.jpg'); $storage->dumpFileContents($file, TRUE, 'test-filename.jpg');
The file "test-filename.jpg" gets dumped and is not readable, as it it compressed.
When showing fileinfo for the file, it shows
file test-filename.jpg test-filename.jpg: gzip compressed data, from Unix, max compression
I could not reproduce this in frontend when setting [FE][compressionLevel] = 9, as the file in FE is not dumped at all (only a 0 bytes file is saved). Using [FE][compressionLevel] = 0 dumps the file correctly.
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.1 (Cleanup)
- Sprint Focus set to On Location Sprint
Updated by Ingo Schmitt almost 10 years ago
- Status changed from New to In Progress
Updated by Roman Schürmann almost 10 years ago
The patch for the related issue (see https://forge.typo3.org/issues/64273) will solve this problem too
Updated by Ingo Schmitt almost 10 years ago
- Status changed from In Progress to Closed
Fixed by #64273
Updated by Anja Leichsenring almost 9 years ago
- Sprint Focus deleted (
On Location Sprint)