Task #52589

Epic #55070: Workpackages

Epic #54260: WP: FAL Missing Issues / Features / API

Story #54261: As an Extension-Developer I want to use FAL assets in my custom development

Method for direct output of file

Added by Bernhard Kraft over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-10-07
Due date:
% Done:

100%

Estimated time:
1.00 h
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
easy
Sprint Focus:

Description

In PHP there is a method called "readfile" which allows to directly output a file to output stream. This allows to output files larger than the available amount of memory because the whole file doesn't have to get read into memory.

Such a method is missing for FAL. There should be some method "outputContent" which reads in file data in chunks and outputs them using "echo".

Or propose another solution for sending large files to the browser.

Associated revisions

Revision 3ac80662 (diff)
Added by Steffen Ritter about 6 years ago

[TASK] Add possibility to dump file to browser

The FileAbstractionLayer currently only provides the possibility to
retrieve the contents of a file as a string. If you want to output
a file this would lead to a massive memory overhead for large files
when building some kind of download/jumpurl/access-restricted download
script.

This change adds a method "dumpFileContents" to the ResourceStorage
allowing to directly output the contents of the file including setting
correct headers.

In addition it introduces a new method (same name) in the DriverInterface
and implements it in the LocalDriver.

Resolves: #52589
Releases: 6.2
Change-Id: I050da59b136fafbf3f05ac814bd3f11f20ae2396
Reviewed-on: https://review.typo3.org/26835
Reviewed-by: Frans Saris
Reviewed-by: Philipp Gampe
Reviewed-by: Ingo Schmitt
Reviewed-by: Sebastian Fischer
Tested-by: Sebastian Fischer
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack

Revision 5ce03514 (diff)
Added by Benni Mack about 6 years ago

[BUGFIX] FAL: Followup to New dump file to browser

Cache control headers need to be sent for IE8 and
HTTPS combination. See #16491 for more details.

Resolves: #52589
Releases: 6.2
Change-Id: I746820dbbb8ca40a9db7e474ac9aaa7ee3d2fb33
Reviewed-on: https://review.typo3.org/27217
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack

History

#1 Updated by Oliver Hader over 6 years ago

  • Target version deleted (next-patchlevel)

Well, you can determine the URI of the file and output it by individual stream handlers.
If the URI is public readable as well, a HTTP location header would be enough.

#2 Updated by Bernhard Kraft over 6 years ago

If the URI is not public readable I am stuck to stream handlers. It would be nice to have an abstract way of doing this instead of having to implement for every possible storage driver.

Note that I set this as "should have" and "feature". So ... no hassle.

#3 Updated by Steffen Ritter over 6 years ago

  • Status changed from New to Accepted
  • Assignee set to Steffen Ritter
  • Target version set to 6.2.0

#4 Updated by Steffen Ritter over 6 years ago

  • Estimated time set to 1.00 h
  • Complexity changed from medium to easy

#5 Updated by Steffen Ritter over 6 years ago

  • Parent task set to #54261

#6 Updated by Steffen Ritter about 6 years ago

  • % Done changed from 0 to 40
  • translation missing: en.field_remaining_hours set to 1.0

#7 Updated by Steffen Ritter about 6 years ago

  • Target version set to 6.2.0

#8 Updated by Gerrit Code Review about 6 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26835

#9 Updated by Steffen Ritter about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 40 to 100

#10 Updated by Bernhard Kraft about 6 years ago

Thanks for taking care of those FAL issues !

#11 Updated by Gerrit Code Review about 6 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27217

#12 Updated by Benni Mack about 6 years ago

  • Status changed from Under Review to Resolved

#13 Updated by Riccardo De Contardi over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF