Results 1 to 3 of 3

Thread: [SOLVED] Insert picture

  1. #1
    New user
    Join Date
    03-17-17.
    Posts
    2

    Default [SOLVED] Insert picture

    Hi,

    I'm new on Contao.
    I just create a new Module, in this module I have some text fields and one Filetree field.
    i want to make frontend users can post elements in my table, so I use formular generator. All is working for every fields except for picture. My form is uploading picture in library, but not set "link" in database.
    Also, when I click on submit, my form create 2 element in my table and I don't know why...

    Here is my field in DCA :

    Code:
    'image' => array
    (
    	'label'                   => &$GLOBALS['TL_LANG']['tl_mytable']['image'],
    	'exclude'               => true,
    	'inputType'            => 'fileTree',
    	'eval'                   => array('filesOnly'=>true, 'extensions'=>Config::get('validImageTypes'), 'fieldType'=>'radio', 'mandatory'=>false),
    	'sql'                     => "binary(16) NULL"
    )
    Thanks in advance for your responses and sorry for my poor english
    Last edited by Mjolnir; 03/20/2017 at 11:51.

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    The form generator only stores the file path of the uploaded file in the database. However, you can use [store_uuid] to make all forms store the UUID instead (if appropriate).

  3. #3
    New user
    Join Date
    03-17-17.
    Posts
    2

    Default

    It works, great thanks, you saved my day !!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •