docs icon indicating copy to clipboard operation
docs copied to clipboard

Add eval field 'storeFile'

Open Tastaturberuf opened this issue 5 years ago • 1 comments

Ich habe den Fall, dass ein Mitglied über das Module Persönliche Daten Dokumente hochladen soll, die in seinem Homedirectory gespeichert und mit dem Datenbankfeld gespeichert werden sollen. Im DCA habe ich den Type fileTree gesetzt, der wird im Frontend auch in ein upload-Widget umgewandelt. Nur speichern geht halt nicht. Gibts dafür einen trick contao von haus aus dazu zu bewegen oder eine brauchbare gepflegte erweiterung?

Hab's gefunden.

'eval' => [
        'storeFile' => true,
        'uploadFolder' => '...'
]

https://contao.slack.com/archives/CK4J0KNDB/p1599139409210600

Tastaturberuf avatar Sep 04 '20 07:09 Tastaturberuf

Hm, this is a tricky one, as this attribute is specific to the front end form field FormFileUpload. Thus putting it into the eval documentation of the DCA would not be entirely correct, as it has no meaning in the back end.

fritzmg avatar Sep 04 '20 08:09 fritzmg