Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

DataObjectManager custom upload destination


Reply

2 Posts   876 Views

Avatar
Tonyair

14 July 2010 at 5:13am Community Member, 81 Posts

How can I add custom upload destination folder?

And also I want parse FileName in order to set Item.Name, shall I use onBeforeWrite?

$dataobjectmanager = new ImageDataObjectManager(
            $this,
            'ItemsPage',
            'Item',
            'Photo',
            array('Thumb' => 'Photo', 'Name' => 'Name', 'Description' => 'Description'),
            'getCMSFields_forPopup'
      );

Avatar
UncleCheese

14 July 2010 at 5:50am 4085 Posts

Two ways:

$manager->allowUploadFolderSelection();

or

$manager->setUploadFolder($folder);