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 #1

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.1 (Cleanup)
  • Sprint Focus set to On Location Sprint
Actions #2

Updated by Ingo Schmitt almost 10 years ago

  • Complexity set to easy
Actions #3

Updated by Ingo Schmitt almost 10 years ago

  • Status changed from New to In Progress
Actions #4

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

Actions #5

Updated by Ingo Schmitt almost 10 years ago

  • Status changed from In Progress to Closed

Fixed by #64273

Actions #6

Updated by Anja Leichsenring almost 9 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF