Project

General

Profile

Actions

Bug #64330

closed

dumpFileContents does not work as intended when compression is enabled

Added by Torben Hansen almost 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2015-01-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #64273: Downloading FAL media via FileDumpEID.php causes an out of memory errorClosed2015-01-14

Actions
Actions

Also available in: Atom PDF