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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

uploadify :: problem:: can't create directory


Go to End


10 Posts   3287 Views

Avatar
trumi

Community Member, 14 Posts

28 September 2010 at 6:52am

hello

i deside to use uploadify for multiple file upload, because i see it allows to create folders where to upload files.
i take modul from leftandmain.com, put in root , dev/build,..
go to admin files and images, click add files to upload, uploadify show in popup, i write name of directory to create and nothing.

when i upload images it writes No files attached ???

i try with this in page

static $has_one = array(
'Mainimage' => 'File'
);

static $has_many = array (
'AttachedFiles' => 'ArticleFile'
);

function getCMSFields() {
$fields = parent::getCMSFields();

$fields->addFieldToTab('Root.Content.Main', new TextField('Subtitle'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new DatePickerField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
$fields->addFieldToTab("Root.Content.File", new FileUploadField('Mainimage','Upload a file'));
$fields->addFieldToTab("Root.Content.Main", $MFile = new MultipleFileUploadField('AttachedFiles','Upload several files'),'Content');

$MFile ->allowFolderSelection();

return $fields;
}

cant create directory.

when select files from existing and click insert and save page, when come back to edit page, images that i inserted are listed but images are not.

please help

Avatar
UncleCheese

Forum Moderator, 4102 Posts

28 September 2010 at 7:20am

Did you click the "change" button after typing in the new directory name?

Where is your ArticleFile class?

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
trumi

Community Member, 14 Posts

28 September 2010 at 7:28am

yes i clikc change button, i realy need help, i can give you access to ftp and admin page to see where is problem?

Avatar
trumi

Community Member, 14 Posts

28 September 2010 at 7:31am

my ArticleFile.php

<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ArticleFile
 *
 * @author ammar
 */
class ArticleFile extends File{
    	static $has_one = array (
		'ArticlePage' => 'ArticlePage'
	);
}
?>

Avatar
UncleCheese

Forum Moderator, 4102 Posts

28 September 2010 at 8:09am

Just checked in a patch. Run an update and you should be all set.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
trumi

Community Member, 14 Posts

28 September 2010 at 8:16am

where can i found last release or how to update i am not an expert?

Avatar
trumi

Community Member, 14 Posts

28 September 2010 at 9:12am

ok UncleCheese creating of directories are fixed.
but i have still problem with importing images , images when uploaded are not shown attach files box.
problem with showing when i select image from existing , image is not shown correctly , look at attachment.

Attached Files
Avatar
UncleCheese

Forum Moderator, 4102 Posts

28 September 2010 at 9:14am

Right. If you want thumbnails, you need to cast your file relation as Image, not File.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Go to Top