-
Notifications
You must be signed in to change notification settings - Fork 1
ORM Model File Column
Darryl Hein edited this page Dec 20, 2013
·
9 revisions
<?php
'field_options' => array(
'file_options' => array(
'destination_folder' => UPLOAD_ROOT_GALLERY,
'name_change_method' => 'id',
'allowed_types' => array('image/pjpeg', 'image/jpeg'),
),
),
<?php
'field_options' => array(
'file_options' => array(
'destination_folder' => UPLOAD_ROOT_GALLERY,
'name_change_method' => 'id',
'ext_check_only' => TRUE,
'allowed_extensions' => array('pdf'),
),
),
<?php
'field_options' => array(
'file_options' => array(
'destination_folder' => UPLOAD_ROOT_GALLERY,
'name_change_method' => 'id',
'original_filename_column' => NULL,
'alternate_filename_display' => 'Download',
'ext_check_only' => TRUE,
'allowed_extensions' => array('pdf'),
),
),
If the model name is 2 or more words, then you'll need to add 'model_name' => 'Supplier_Logo',
To change the original filename column, add 'original_filename_column' => 'new_col_name',