Ergebnis 1 bis 3 von 3

Thema: Contao Fineuploader

  1. #1
    Contao-Nutzer
    Registriert seit
    21.01.2020.
    Beiträge
    44

    Standard Contao Fineuploader

    Hallo ich würde gerne die Bilder von Contao Fineuploader im Frontend ausgeben. Wenn ich allerdings in die DB anschaue, dann wird folgender Inhalt in Blob gespeichert: †ò´Ž=ê•òäçI6@³. Wie kann ich die Daten ausgeben. Irgendwie greift ja Contao Fineuploader auf diese Daten zu und gibt Sie im Backend aus. Habe dabei folgende DCA Einstellung:
    HTML-Code:
    GLOBALS['TL_DCA']['tl_member']['fields']['profilepic'] = array
    (
        'label'     => &$GLOBALS['TL_LANG']['tl_member']['profilepic'],
        'exclude'   => true,
        'inputType' => 'fineUploader',
        'eval'      => array('storeFile'=>true, 'useHomeDir'  => true,  'mandatory'=>false, 'uploadFolder'      => 'files/user/','feEditable'=>true, 'feViewable'=>true, "tl_class" => "w50 wizard", 'feGroup'=>'address', 'extensions' => 'jpg, jpeg, png', 'addToDbafs'        => true,),
        'sql'                     => "blob NULL"
    );
    $GLOBALS['TL_DCA']['tl_member']['fields']['verifypic'] = array
    (
        'label'     => &$GLOBALS['TL_LANG']['tl_member']['verifypic'],
        'exclude'   => true,
        'inputType' => 'fineUploader',
        'eval'      => array('storeFile'=>true, 'useHomeDir' => true,'uploadFolder'      => 'files/user/',  'mandatory'=>false, 'feEditable'=>true, 'feViewable'=>true, "tl_class" => "w50 wizard", 'feGroup'=>'address', 'extensions' => 'jpg, jpeg, png', 'addToDbafs'        => true,),
        'sql'                     => "blob NULL"
    );
    
    $GLOBALS['TL_DCA']['tl_member']['fields']['gallery'] = array
    (
        'label'                   => &$GLOBALS['TL_LANG']['tl_table']['gallery'],
        'exclude'                 => false,
        'inputType'               => 'fineUploader',
        'eval'                    => array
        (
            'storeFile'         => true,                // Mandatory to store the file on the server
            'multiple'          => true,                // Allow multiple files to be uploaded
            'uploadFolder'      => 'files/user/',     // Upload target directory (can also be a Contao file system UUID)
            'useHomeDir'        => true,                // Upload to the FE member home directory (overrides "uploadFolder", can also be a Contao file system UUID)
            'uploaderConfig'    => "['debug': true]",   // Custom uploader configuration that gets merged with the other params
            //'uploaderLimit'     => 4,                   // Maximum files that can be uploaded
            'addToDbafs'        => true,                // Add files to the database assisted file system
            'extensions'        => 'jpg, jpeg, png',           // Allowed extension types
            //'maxlength'         => 2048000,             // Maximum file size (is ignored if you use chunking!)
            //'maxWidth'          => 800,                 // Maximum width (applies to images only)
            //'maxHeight'         => 600,                 // Maximum height (applies to images only)
            'doNotOverwrite'    => true,                // Do not overwrite files in destination folder
            //'uploadButtonLabel' => 'Upload images',     // Custom upload button label
    
            'maxConnections'    => 3,                    // Maximum allowable concurrent requests
    		'feViewable' => true, 
    		'feEditable'=>true, 
    		"tl_class" => "w50 wizard",
    
            // Upload the files directly to the destination folder. If not set, then the files are first uploaded
            // to the temporary folder and moved to the destination folder only when the form is submitted
            //'directUpload' => true,
            
            // Set a custom thumbnail image size that is generated upon image upload  
            //'imageSize'         => [160, 120, 'center_center'],
    
            // You can also use the default features of fileTree widget such as:
            // isGallery, isDownloads
    
            // The "orderField" attribute is not valid (see #9)
        ),
        'sql'                     => "blob NULL"
    );

  2. #2
    Contao-Nutzer
    Registriert seit
    12.10.2011.
    Beiträge
    28

    Standard

    Hallo Stefan,

    hast du es schon hinbekommen, habe gerade das gleiche Problem.

  3. #3
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.063
    Partner-ID
    10107

    Standard

    Das ist eine UUID. So bekommt man das FilesModel davon:
    PHP-Code:
    $file = \Contao\FilesModel::findByUuid($uuid); 

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •