Review main Abandoned

1589[FEATURE] Add possibility to have record-based uploadFolders

Steffen Ritter CR 0 V 0 Easy +15 −2 updated 06/03/13, 20:49

Commit message

If you use the TCA type "group", internal_type "file" with many
file relations and high amounts of records the upload folder messes up.
You might want to "structure" this a little bit - maintainance would be
easier, too.

Like known from select foreign_table_where the uploadfolder should
be "adaptable" by fields of the record via passing ###REC_field### markers.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 24

  1. Andreas Wolf commented on patch set 2 2 comments 12/19/11, 18:49

    I would prefer that you didn't submit this See my two comments. Apart from that the patch looks good.
  2. Mario Rimann commented on patch set 2 12/19/11, 18:49

    I would prefer that you didn't submit this Please add the comment (see my inline comment) then it looks fine to me.

    class.t3lib_tcemain.php:1584

    please add a comment on what's done here exactly
  3. Mario Rimann commented on patch set 2 12/19/11, 18:49

    (1 inline comment)
  4. Björn Pedersen commented on patch set 2 1 comment 12/19/11, 18:49

    Looks good to me, but someone else must approve Except for a minor question the code looks good to me.
  5. Dmitry Dulepov commented on patch set 3 12/19/11, 18:49

    We can simply specify that in the documentation: ###REC_FILED_UID### should not be used. That's all.
  6. Dmitry Dulepov uploaded patch set 3 12/19/11, 18:49

  7. Dmitry Dulepov commented on patch set 3 12/19/11, 18:49

    Changes from version 2: - use mkdir_deep instead of mkdir (for example, if you want to use a structure like uploads/tx_yourext/###REC_FIELD_pid###/###REC_FIELD_username###) - always check for dir existance (helps when you installed the ext but forgot to create the upload dir (just a small goodie)
  8. Stefan Neufeind commented on patch set 2 12/19/11, 18:49

    Looks good to me, but someone else must approve
  9. Stefan Neufeind commented on patch set 2 12/19/11, 18:49

    Steffen, please have a look at the comments: Imho this looks to me like it's almost through. And it would be great to have it in.
  10. Stefan Neufeind commented on patch set 3 12/19/11, 18:49

    Looks good to me, but someone else must approve
  11. Oliver Hader uploaded patch set 4 12/19/11, 18:49

  12. Oliver Hader commented on patch set 4 12/19/11, 18:49

    Fails; I would prefer that you didn't submit this I understand the reasons of not having thousands of files in one single directory. However I doubt, that this is the correct approach to have a fragmentation of the filesystem. I'd rather opt to have several hooks in place that could take care of individual processing and tossing to directories then. When the file abstraction layer comes to live, this will be handled by a layer then - so no need to put that into TCEmain at this time. Sorry... Besides that: I guess a dedicated field of a record (which might be changable) defines where to put those files accordant to your patch. Let's assume the types are "video", "images" and "documents". Now imagine the following: * ####REC_FIELD_THETYPE### reflects those mentioned three types * there's a record with type "video" and two files * the record gets modified to type "documents", the previous files removed and new files added * the old files won't be removed from the "video" directory since it's not known anymore at the record That why I've chosen the -1 on verify as well.
  13. Oliver Hader commented on patch set 4 12/19/11, 18:49

    Looks good to me, but someone else must approve Rebasing to master V:0, R:1 V:0, R:1 from Stefan Neufeind <typo3.neufeind@speedpartner.de>
  14. Steffen Ritter uploaded patch set 2 12/19/11, 18:49

    class.t3lib_tceforms.php:2218 Reply

    it would, but I just omitted it here, because we do not need an extra database acces to get the data and I'm not sure if the substituteMarkerArray itself would not hurt in case of speed

    class.t3lib_tcemain.php:1584 Reply

    How about: // For performance reasons just process markers and field replacement when there it's really needed

    class.t3lib_tcemain.php:1585 Reply

    Even if you look at a deleted record (f.e. recycler, history of pages etc) this information might be needed. At least I think if an infomration from an deleted records is requested at TCEmain (wherever) it should be retourned completely. Furthermore when we quey for an uid, i think we can ommit the deleted in sence of "speed"
  15. Steffen Ritter commented on patch set 2 12/19/11, 18:49

    (3 inline comments)
  16. Steffen Ritter commented on patch set 3 12/19/11, 18:49

    Fails I know that I created this one, but I also encountered an conceptional bug: ###REC_UID### is not set for new records... Therefore the images go to the wrong folder... If any one finds an brillians solution for this - great - until then, I cannot support merging a buggy feature.
  17. Steffen Ritter commented on patch set 3 12/19/11, 18:49

    No score fine removing my -1
  18. Philipp Gampe commented on patch set 4 12/19/11, 18:49

    Looks good to me, but someone else must approve
  19. Mr. Jenkins commented on patch set 1 12/19/11, 18:49

  20. Mr. Jenkins commented on patch set 2 12/19/11, 18:49

  21. Mr. Jenkins commented on patch set 3 12/19/11, 18:49

  22. Mr. Jenkins commented on patch set 4 12/19/11, 18:49

  23. Dominik Mathern commented on patch set 4 12/19/11, 18:49

    Verified; Looks good to me, but someone else must approve
  24. Steffen Ritter commented on patch set 4 12/19/11, 18:49

    Abandoned FAL changes the file-relation stuff anyhow...