7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » FileUploads and the DOM + SWFUpload
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 2890 Views |
-
FileUploads and the DOM + SWFUpload

29 March 2010 at 9:09pm Last edited: 29 March 2010 9:12pm
Hi Uncle Cheese,
Big fan of your work, i am having a little issue with the latest trunk version of DOM, SWFUpload and SilverStripe 2.4 Beta2. We have popups with the following code.
public function getCMSFields_forPopup()
{
return new FieldSet(
new TextField('Title'),
new SimpleHTMLEditorField('Description','Description'),
new SWFUploadFileIFrameField('FeatureImage','Feature Image')
);
}
We originally just had FileIFrameField but as you know the dropdown list does not work so it is impossible to select already uploaded images. So i decided to see if we can use SWFupload however we get the following errorFatal error: Class 'Image_Uploader' not found in /path/to/files/SWFUploadFileIFrameField.php on line 47
As it appears Image_Uploader class is no longer in the core image.php file?
Any ideas, am i wasting my time will i be able to select existing files with in a popup using DOM and SWFupload?
-
Re: FileUploads and the DOM + SWFUpload

30 March 2010 at 4:09am
Interesting.. looks like they finally sunsetted that Image_Uploader class. It's been obsolete ever since form fields became their own controllers. It seems like the fix might be as easy as changing the parent class from Image_Uploader to "FileIFrameField".. can you try that?
-
Re: FileUploads and the DOM + SWFUpload

30 March 2010 at 10:02am
After making the change the following error occurs
[Warning] Missing argument 1 for FileField::__construct(),
in /path/to/file/sapphire/core/control/Director.php on line 280 and defined
GET /path/to/file/swfuploadfile/iframe/ProductFeature/15/FeatureImage
Line 78 in /path/to/file/sapphire/forms/FileField.phpI also noticed that the SWFUploadFileIFrameField still uses the TreeDropdownField so i dont think it will resolve our problem. Do you know of a solution to allow the selection of exsisting uploads in the popup?
-
Re: FileUploads and the DOM + SWFUpload

31 March 2010 at 3:53am
All good latest trunk of 2.4 solves the issues.
Its a good day. -
Re: FileUploads and the DOM + SWFUpload

9 April 2010 at 6:34am
Guys, I'm trying to get a SWFUploadFileIFrameField to replace an image field in ModelAdmin and getting the same error: Fatal error: Class 'Image_Uploader' not found in /path/to/files/SWFUploadFileIFrameField.php on line 47
The reason I'm trying to use a SWFUpload field is that I'm finding it impossible to set the allowed extensions on my image and pdf fields. It's driving me nuts. I'm using 2.4-rc1...
-
Re: FileUploads and the DOM + SWFUpload

14 May 2010 at 7:05am
Hi,
I'm new to Silverstripe and trying to implement multiple files on a form page. I have tried uploading with SWFUpload but am having the same issues as hive.net.au. I tried installing DOM, but it just doesn't seem to not work with the latest stable version of SS 2.4.
Either there is an issue with the Image_Uploader, cannot find SimpleWysiwygField, or I simply get a blank tab when trying to implement the Resource example.
Is there any way to solve these issues or is there a better way to attach multple files/images to a form page that will stop the hours of frustration that this evening has been?
Thanks in advance.
J -
Re: FileUploads and the DOM + SWFUpload

14 May 2010 at 7:10am
The trunk version of DOM is 2.4... the 2.3 version was branched off around rev 385 or so. Make sure your code is up to date.
-
Re: FileUploads and the DOM + SWFUpload

14 May 2010 at 7:19am
I'm using
modules-dataobject_manager-r395
modules-swfupload-r375with Silverstripe 2.4.0
Is this correct and up-to-date?
| 2890 Views | ||
| Go to Top | Next > |



