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:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Uploadify HTTP Error

Go to End

80 Posts   30613 Views


Community Member, 13 Posts

29 August 2011 at 4:32am

I have looked further into the issue now. It seems those bytes are appended to the refresh-Link URL which is called by the Uploadify SWF when the upload has finished.


You can see the FileIDs field has those strange hex-codes before the id of the uploaded image, which would be 320 in this case. I'm currently trying to figure out where these come from.


Community Member, 138 Posts

16 November 2011 at 4:34pm

We're having a similar issue as gieser with hex-coded characters getting appended before the FileIDs. In our case it's a combination of line breaks and two tabs: "\r\n\r\n\r\n "


This looks like contamination from the source code but it's hard to know where we should be looking.


Community Member, 31 Posts

2 December 2011 at 6:12pm

I'm getting the same problem as above. The selected files/images are uploading fine but are not being attached. A 500 error is being thrown with the ID being returned with extra characters.

ERROR [User Warning]: DataObject::get_by_id passed a non-numeric ID #\r\n264
IN GET /mysite/admin/EditForm/field/Photo/refresh?FileIDs=%0D%0A264
Line 2924 in C:\wamp\www\mysite\sapphire\core\model\DataObject.php


Community Member, 56 Posts

15 February 2012 at 10:37pm

is there any solution for that extr-character issue in front of the fileID?


Community Member, 56 Posts

15 February 2012 at 11:20pm


in FileUploadField or MultipleFileUploadField we have a function called File,...

MultipleFileUploadField Line 161 we have a DataObject::get to get the list of attached files

-> if($files = DataObject::get($class, "\"{$class}\".\"ID\" IN (".Convert::raw2sql($list).")")) {

I changed it into

if($files = DataObject::get($class, "\"{$class}\".\"ID\" IN (".Convert::raw2sql(preg_replace('![^,0-9]!', '', $list)).")")) {

the regular expression removes all characters except of numbers and commas (which separates the ids)

I tried to write a decorator to override the File-Function but without luck,... maybe anybody can tell me how to do this?
Where to put the decorator-file?
In which conifg-file do I have to register the decorator?



Community Member, 2 Posts

13 April 2012 at 9:52am

I had this same HTTP error when trying to upload a PDF file using Uploadify with FileUploadField, although it worked fine with ImageUploadField.
I decided to go back to the old FileIFrameField upload method. This gave me the error: "[User Error] Bad RecordClassName '' and $baseClass not set". I looked in the File table and found several records with empty ClassName fields. When I fixed this issue FileIFrameField started working, as did FileUploadField.


Community Member, 46 Posts

27 April 2012 at 3:24am

I just stumbled across the same problem as gieser. %EF%BB%BF is the Unicode byte order mark. This means that some file is saved as UTF8. To fix the error find the file (it is most probably some file you wrote yourself!) and save as UTF8 without byte order mark. Most editors should be capable of doing this. In Notepad++ it is done by choosing Encoding->Encode in UTF-8 without BOM.

sticks had/has %0D%0A, which is windows style newline (CR LF ). Look for a newline in front of <?php


Scott Farmer

Community Member, 49 Posts

3 May 2012 at 11:33am


Uploadify HTTP errors:
I was banging my head against the wall on this one! It turns out it was a rather simple solution.

Make sure the function name is the same name used in the form. The controller action.

function ImageUploadStepForm() {

$fields = new FieldSet(
new FileUploadField('UserPhoto2', 'Upload Image')


$form = new Form($this, 'ImageUploadStepForm' (!!!Has to be the same!!!), $fields, $actions);

Hope that helps other people with this issue.