UncleCheese,
Thanks again for your help mate.
I have another issue now. I cant seem to define where the handleswfupload function is. Here is my code:
function ImageUploadForm() {
SWFUploadConfig::addFileTypes(array('jpg','gif'));
SWFUploadConfig::addDynamicPostParam('ImageAlbum','Form_ImageUploadForm_ImageAlbum');
$fields = new FieldSet(
new TextField('ImageTitle', 'Image Title'),
new DropdownField("ImageAlbum", "Please select a category", $this->getAlbums()),
new SWFUploadField('ImageUploadForm','UploadImage','Please select an image to upload.',array('file_upload_limit' => '3','required' => 'true','debug' => 'true','upload_url' => $this->Link('handleswfupload')))
);
$actions = new FieldSet(
new FormAction('doUpload', 'Submit')
);
return new Form($this, 'ImageUploadForm', $fields, $actions);
}
If i look inside the debug window my Upload URL is /submit-a-picture/handleswfupload, which i thought looks fine - but when i submit the photo, i get a javascript alert full of html (view attached image). My handleswfupload function is in the same controller as the above form.
It works fine if i leave the default upload_url. Any ideas? Is this something to do with 2.4?
On a side note - can i change the class it uses to ImageGalleryItem from Image?
Cheers