Ja Nosch
Ja Nosch

Reputation: 423

TYPO3: Upload files to FAL with powermail

I am using powermail to allow a FE-User to edit a couple of fields of his own User-Record. Works fine, no hassle.

Now I would also like to allow the upload of a file. Is there a way to save the file to FAL with powermail? Unfortunately I have found no resources on this whatsoever. Maybe it is possible to implement a userfunc when saving to DB that would generate the required DB entries? When using powermails "upload"-field-type the file gets written to uploads/tx_powermail. I have access to that files path in my db_entry step in typoscript and could pass it on to a userfunc - which in return should

Am I missing something? Any ideas on this? Has anyone done something like this before?

Or is my only alternative to switch from powermail to a custom extbase extension?

System: TYPO3 7.6.16, Powermail 3.17

Thanks

Upvotes: 0

Views: 1017

Answers (3)

Pravin Vavadiya
Pravin Vavadiya

Reputation: 3207

I have same problems in powermail and i use powermail Finisher class like below.

TYPOSCRIPT:

plugin.tx_powermail.settings.setup {
    finishers {
        1 {
          class = Vendor\Ext\Finisher\AddImageFinisher
          config {
             # set pid.            
             pid = TEXT
             pid.value = 79 // Here

             #set powermail fields title
             field_name = Name
             field_place = Place
             field_email = E-Mail
             field_message = Message
          }
        }
    }
}

Please reffere this link. AddImageFinisher Class file

Upvotes: 2

Björn
Björn

Reputation: 535

Just for the record. TYPO3 8 core ships a new form extension which allows both. With the save to database finisher you can easily edit fe_user data. Furthermore, all image uploads are handled as FAL. We will document this use case and release a small extension which does the job (soon).

Upvotes: 0

Alex Kellner
Alex Kellner

Reputation: 1299

At the moment powermail don't uses FAL relations. If you need something like this, you have to add an own finisher that does the upload stuff - see https://docs.typo3.org/typo3cms/extensions/powermail/ForDevelopers/AddFinisherClasses/Index.html

Upvotes: 1

Related Questions