Feature #5718

Implement File upload support

Added by Alexandre Martinez almost 10 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Could have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2009-12-11
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
hard
Sprint Focus:

Description

The RequestBuilder object should handle file uploads as request arguments. A File object is needed to map the params and can be persisted. Reading of the file is done by a file reader extending abstract file reader which can be used to create objects from file data. Validation can be applied to the File object by writing the corresponding FileValidator.
Attached files are a quick try at csv file reading. Usage of property mapper should be rewritten.

RequestBuilder.php View (2.87 KB) Alexandre Martinez, 2009-12-11 14:21

File.php View (4.07 KB) Alexandre Martinez, 2009-12-11 14:21

AbstractFileReader.php View (2.58 KB) Alexandre Martinez, 2009-12-11 14:21

CsvFileReader.php View (2.04 KB) Alexandre Martinez, 2009-12-11 14:21


Related issues

Related to TYPO3 Core - Bug #48965: FileReference can't be created in Frontend context Closed 2013-06-08

Associated revisions

Revision 035f15ca (diff)
Added by Jost Baron almost 5 years ago

[BUGFIX] Add property "uidLocal" to extbase FileReference model

This is needed so extbase persists FileReferences created in the
frontend correctly. Otherwise the field "uid_local" would always
be set to 0 in the database, creating an invalid file reference.

Resolves: #48965
Related: #5718

Releases: 6.2, master
Change-Id: I1e620c18d60546fdc081410b1d27a1b1de6f3e5b
Reviewed-on: http://review.typo3.org/37417
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision aef204f2 (diff)
Added by Jost Baron almost 5 years ago

[BUGFIX] Add property "uidLocal" to extbase FileReference model

This is needed so extbase persists FileReferences created in the
frontend correctly. Otherwise the field "uid_local" would always
be set to 0 in the database, creating an invalid file reference.

Resolves: #48965
Related: #5718

Releases: 6.2, master
Change-Id: I1e620c18d60546fdc081410b1d27a1b1de6f3e5b
Reviewed-on: http://review.typo3.org/37463
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Jochen Rau over 9 years ago

  • Status changed from New to Accepted
  • Target version set to Extbase 1.3.0beta1

#2 Updated by Sebastian Kurfuerst over 9 years ago

Hey Jochen,

do you know the corresponding implementation of Resources in FLOW3? I think, in case we implement this feature, we should also do it like it is done in FLOW3.

Greets,
Sebastian

#3 Updated by Sebastian Kurfuerst almost 9 years ago

  • Tracker changed from Feature to Story
  • Subject changed from File upload support to Implement File upload support
  • Status changed from Accepted to New

#4 Updated by Sebastian Kurfuerst almost 9 years ago

  • Category set to Extbase: MVC

#5 Updated by Sebastian Kurfuerst almost 9 years ago

  • Priority changed from Should have to Could have
  • Target version deleted (Extbase 1.3.0beta1)

Won't have this feature in the near future, if nobody implements it along the lines of FLOW3.

#6 Updated by Thomas Maroschik almost 9 years ago

FLOW3 uses a RessourceObjectConverter along with a RessourceManager for this. We could backport this if object converter support in #5595 gets into trunk.

#7 Updated by Sebastian Kurfuerst over 8 years ago

  • Tracker changed from Story to Feature

#8 Updated by Kevin Ulrich Moschallski over 7 years ago

Hi everyone,

is there any update on backporting the FLOW3 ResourceManager to extbase?
Since the new property mapper brought us the FLOW3 type converter in extbase the backport should be possible now, right?
I currently trying to implement a clean way to upload a file or multiple files with a fluid form. I tried it with support of the fed extensions fileObjectStorage in conjunction of the Tx_Fed_Resource_File.
The problem is that Tx_Fed_Resource_File only handles already uploaded files, which leads the to the problem that i can't use it as property type in my model.
So i digger more into this and find this bug, after a quick look into the FLOW3 implementation i think this would be quite nice for extbase.

The biggest problems i think will be:

  • Support TCA upload folder instead of a global folder like in FLOW3
  • First bring #34528 into master (this will be a breaking change, as all upload properties will change from string to array)
  • As far i can see the upload then would take place before validation is passed, this could lead to garbage files
  • Maybe FAL should be implemented (don't know much about this up to now)

I really looking forward to hear some opinions on this as i'm willing to implement this or help on it.

#9 Updated by Alexander Schnitzler about 7 years ago

  • Status changed from New to On Hold
  • Has patch set to No

Set this to 'on hold' because we have to wait until the new property mapper can finally be used securely. This will be done for 6.1.

#10 Updated by Alexander Schnitzler over 6 years ago

  • Status changed from On Hold to New
  • Target version set to Extbase 6.2

#11 Updated by Alexander Schnitzler over 6 years ago

  • Status changed from New to Accepted

#12 Updated by Anja Leichsenring over 6 years ago

  • Target version changed from Extbase 6.2 to Extbase 6.3

#13 Updated by Alexander Opitz about 5 years ago

  • Project changed from Extbase MVC Framework to TYPO3 Core
  • Category changed from Extbase: MVC to Extbase
  • Status changed from Accepted to New
  • Target version changed from Extbase 6.3 to 7.0

#14 Updated by Mathias Schreiber almost 5 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)

#15 Updated by Stefan Neufeind almost 5 years ago

Helmut created something regarding file-uploads with Extbase and FAL: https://github.com/helhum/upload_example

#16 Updated by Helmut Hummel almost 5 years ago

  • Status changed from New to Accepted
  • Complexity set to hard

Would be great, to have something like that implemented.

However, please be aware, that by providing this solution to a broader audience I learned that it is not optimal like this. The file reference converter should rather respect that it is at the same time a resource as it is a domain model (title, description) etc.

I had no time to implement this as an example yet and most likely will not have the time to do so for 7.1

#17 Updated by Gerrit Code Review over 4 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 http://review.typo3.org/37898

#18 Updated by Gerrit Code Review over 4 years ago

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

#19 Updated by Benni Mack over 4 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)

#20 Updated by Gerrit Code Review over 4 years ago

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

#21 Updated by Gerrit Code Review over 4 years ago

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

#22 Updated by Gerrit Code Review over 4 years ago

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

#23 Updated by Susanne Moog over 4 years ago

  • Target version changed from 7.4 (Backend) to 7.5

#24 Updated by Benni Mack about 4 years ago

  • Target version changed from 7.5 to 8 LTS

#25 Updated by Wouter Wolters over 3 years ago

  • Status changed from Under Review to New

#26 Updated by Riccardo De Contardi almost 3 years ago

  • Target version changed from 8 LTS to 9.0

#27 Updated by Susanne Moog almost 2 years ago

  • Target version deleted (9.0)

Also available in: Atom PDF