10441 Posts in 2220 Topics by 1717 members
| Go to End | Next > | |
| Author | Topic: | 5057 Views |
-
SWFUpload Documentation

16 January 2009 at 4:20pm
I've posted the documentation for SWFUploadField here: http://doc.silverstripe.com/doku.php?id=swfuploadfield
-
Re: SWFUpload Documentation

20 April 2009 at 10:46pm
i was just wondering wheter it's possible to use SWFUploadFileIFrameField in a popup in the cms.
this to avoid the common 'You can add images once you have saved for the first time.' hassle of Imagefield.
unfortunately, it doesn't seem to work (using swfuploadfileiframefield in getCMSFields_forPopup gives errors).
is this supposed to work so i am doing something wrong?
or maybe there's a more clever way to circumvent the 'upload after first save' issue?
thanks in advance -
Re: SWFUpload Documentation

21 April 2009 at 3:39am
Hello,
Thanks for your interest in the SWFUpload module. The SWFUploadFileIFrame field is useful for filtering out unwanted file types and sizes and displaying a progress bar for large files, but one thing it cannot do is overcome the (annoying) issue of having to save a new record before adding a file. The reason is because your file object needs an "ownerID" to make the correct association with your DataObject class. Until the record is saved, that ID of course, does not exist.
If you're looking for a better way of handling this issue, I'd recommend using the DataObjectManager. Though it doesn't have a "fix" for the problem, it is handled in a much cleaner way with clear language to the user. For instance, if your DataObject has a File relation called "Image", the save button on a new record will read "Save and add Image" -- as opposed to a standard CTF, which will advance the user to a new record without any indication that a file has not been added.
Try it out!
-
Re: SWFUpload Documentation

7 March 2010 at 12:15pm
I know this is an old post, but is the "owner ID" statement still relevant? I thought it was the owner that points at the File or Image record rather than the File or Image that points at the owner. A file can be uploaded onto the system without linking it to any other objects.
It ought to be possible to upload the files first, and getting their unique IDs. Once the main record is saved, it can be linked to the files. The files could even be uploaded to a special object that labels them as temporary, and they can be cleaned up by some house-keeping if they are not linked to some object within a given time-frame.
-- Jason
-
Re: SWFUpload Documentation

7 March 2010 at 12:21pm
I guess the documentation has been moved, but all links seem to point back to this same dead page.
-- Jason
-
Re: SWFUpload Documentation

7 March 2010 at 5:11pm
This is the correct link:
http://doc.silverstripe.org/doku.php?id=modules:swfuploadfield
What you're describing is the way SWFUploadField works. SWFUploadFileIFrameField has been deprecated.
-
Re: SWFUpload Documentation

9 March 2010 at 6:35am
Not sure where to submit bugs/fixes, so UncleCheese direct me if needed.
Portability issue with SWFUploadFileIframeField:
The RelativeLink method returns a url that is not entirely portable and was causing uploads to fail with a 404 on a site we have installed in a subfolder.
The fix was to replace
public function RelativeLink($action = null)
{
if($action === null) $action = "index";
return "/swfuploadfile/$action/".$this->urlParams['Class']."/".$this->urlParams['ID']."/".$this->urlParams['Field'];
}with
public function RelativeLink($action = null)
{
if($action === null) $action = "index";
return "swfuploadfile/$action/".$this->urlParams['Class']."/".$this->urlParams['ID']."/".$this->urlParams['Field'];
}removed the "/" from the beginning of the return.
-
Re: SWFUpload Documentation

12 July 2011 at 8:26pm
I am very interested in this SWFUpload module. I'm building a website, I have some problems with file uploads. could you please give me a code for the example application using this module. existing code in http://doc.silverstripe.org/old/modules:swfuploadfield not help me. thanks.
| 5057 Views | ||
| Go to Top | Next > |




