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   881 Views

Avatar
Tonyair

Community Member, 81 Posts

14 July 2010 at 5:13am

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

4085 Posts

14 July 2010 at 5:50am

Two ways:

$manager->allowUploadFolderSelection();

or

$manager->setUploadFolder($folder);