Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » SWFUploadFileIFrameField and SS 2.4

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 1737 Views
  • brice
    Avatar
    Community Member
    50 Posts

    SWFUploadFileIFrameField and SS 2.4 Link to this post

    According to http://www.silverstripe.org/dataobjectmanager-module-forum/show/281838 the Image_Uploader class that SWFUploadFileIFrameField extends has been removed from the core of SilverStripe 2.4...

    So I went ahead and modified SWFUploadFileIFrameField to extend FileIFrameField as per UncleCheese's query in the above post and now get:

    Error: Uncaught Exception: Object->__call(): the method 'setsession' does not exist on 'SWFUploadFileIFrameField_Uploader' At line 724 in ...\sapphire\core\Object.php

    When I try to leverage the SWFUploadFileIFrameField to perform a large video upload with progress meter.

    My DataObject code is as follows:

    class TestVideo extends DataObject {

       static $db = array(
          "Title"      => "Varchar(255)"
       );

       static $has_one = array(
          "Video"      => "File"
       );

       public function getCMSFields() {

    $fields = parent::getCMSFields();
        $fields->addFieldToTab("Root.Main", new SWFUploadFileIFrameField('Video','Video','Upload a file'));
        return $fields;

    }
    }

    I am using the latest trunk of SWFUpload extension. Is it truly 2.4 compatible && I'm implementing it wrongly?? Or does the code need to be updated/tested on 2.4? Please let me know if anyone has it working.

    Thanks!

    ~ Brice

  • brice
    Avatar
    Community Member
    50 Posts

    Re: SWFUploadFileIFrameField and SS 2.4 Link to this post

    I see that "class SWFUploadFileIFrameField_Uploader extends Image_Uploader" in the latest version (r400 from SVN) of SWFUploadField module. Line 55 of the module's _config.php also references this class:

    Director::addRules(10, array(
       'swfuploadfile/$Action/$Class/$ID/$Field' => 'SWFUploadFileIFrameField_Uploader'
    ));

    As the "Image_Uploader" class has been removed from SS 2.4 -- is the module still compatible?? Has anyone been able to use it in outside of DOM in a getCMSFields overload [In 2.4]?

    It seems that the DOM version of it works... I believe it's because there is reference tot he form & that it's using SWFUploadField and not SWFUploadFileIFrameField ???

    Thanks,

    ~ Brice

  • brice
    Avatar
    Community Member
    50 Posts

    Re: SWFUploadFileIFrameField and SS 2.4 Link to this post

    I believe the base of this issue is that the Image_Uploader class extended controller, while the FileIFrameField class (that we were asked to experiment with) does not. Hence SetSession not being available.

    UncleCheese -> is it possible to get some feedback on this?

    Thanks,

    ~ Brice

  • Tonyair
    Avatar
    Community Member
    81 Posts

    Re: SWFUploadFileIFrameField and SS 2.4 Link to this post

    I have the same issue.

    SS 2.4 rev. 107083 (just updated)

  • Tonyair
    Avatar
    Community Member
    81 Posts

    Re: SWFUploadFileIFrameField and SS 2.4 Link to this post

    I extended it from Upload class cos it's logically clean and looks very similar according to 2.4 api
    "class SWFUploadFileIFrameField_Uploader extends Upload"

    I've got error that SWFUploadFileIFrameField.ss, Upload.ss, Upload_iframe.ss and SWFUploadFileIFrameField.ss not found and really i can't find it in the modules folders there're only empty template folders, so I created this files, but of course nothing is displayed now

    any ideas?

    By the way it works perfectly in the assets with dataobject_manager

  • UncleCheese
    Avatar
    4085 Posts

    Re: SWFUploadFileIFrameField and SS 2.4 Link to this post

    Guys, just a heads up:

    1) I haven't supported SWFUploadIFrameField in almost a year. It never worked correctly.

    2) I'm going to be nuking the whole SWFUpload module very soon in favor of a more stable plugin, and you'll be able to use it interchangeably with FileIFrameField in the CMS. I'm just ironing out the bugs now, but if you can wait just a little longer, there's a much better solution on the way.

  • Tonyair
    Avatar
    Community Member
    81 Posts

    Re: SWFUploadFileIFrameField and SS 2.4 Link to this post

    don't waste ur time i think it needs just some simple addition, for example $FormName variable in the templates, I'll send it here when I finish additions for my own website

  • brice
    Avatar
    Community Member
    50 Posts

    Re: SWFUploadFileIFrameField and SS 2.4 Link to this post

    UncleCheese,

    Thanks for the heads up! I'm looking forward to seeing your work. Please let me know if I can help test or work on anything in the meantime -- I'd be happy to lend some dev time.

    ~ Brice

    1737 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.