Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » FileUploads and the DOM + SWFUpload

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: 3300 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: FileUploads and the DOM + SWFUpload Link to this post

    Yup, r395 that should be 2.4 compatible. What's the error you're getting?

  • kiwiot
    Avatar
    Community Member
    8 Posts

    Re: FileUploads and the DOM + SWFUpload Link to this post

    Well, the good news is that I don't get the same error anymore. I deleted all the modules and reloaded them being careful to flush both the build and cache - so no installation issues - now however there are a whole lot of other strange errors popping up when trying to upload a file and the Assets (files/images) section no longer works.

    That'll have to wait for another day.

    Thanks for your quick responses.

    J

  • kiwiot
    Avatar
    Community Member
    8 Posts

    Re: FileUploads and the DOM + SWFUpload Link to this post

    OK,

    SO there was some sort of path error with the naming on the folder - fixed and now pages are viewing correctly, testimonial example works fine, but I am still unable to upload files.

    I have disabled mod_security if it is running (dont think it is)

    <IfModule mod_security.c>
    SecFilterEngine Off
    </IfModule>

    I followed the suggestions for debugging at http://www.silverstripe.org/dataobjectmanager-module-forum/show/264716?start=0 but still cannot figure out the error.

    Here is a paste of the SWF DEBUG.

    Any suggestions?

    SWF DEBUG: SWFUpload Init Complete
    SWF DEBUG:
    SWF DEBUG: ----- SWF DEBUG OUTPUT ----
    SWF DEBUG: Build Number: SWFUPLOAD 2.2.0 Alpha 2008-10-17
    SWF DEBUG: movieName: SWFUpload_0
    SWF DEBUG: Upload URL: http://www.****.com/v2_0/FileDataObjectManager_Controller/handleswfupload
    SWF DEBUG: File Types String: *.*
    SWF DEBUG: Parsed File Types:
    SWF DEBUG: File Types Description: ()
    SWF DEBUG: File Size Limit: 2097152 bytes
    SWF DEBUG: File Upload Limit: 20
    SWF DEBUG: File Queue Limit: 20
    SWF DEBUG: Post Params:
    SWF DEBUG: controllerID=1
    SWF DEBUG: OverrideUploadFolder=assets/Uploads/
    SWF DEBUG: dataObjectClassName=File
    SWF DEBUG: parentIDName=ParentID
    SWF DEBUG: dataObjectFieldName=
    SWF DEBUG: hasDataObject=0
    SWF DEBUG: fileClassName=File
    SWF DEBUG: fileFieldName=Files
    SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
    SWF DEBUG:
    SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
    SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
    SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
    SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
    SWF DEBUG: StartUpload: First file in queue
    SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
    SWF DEBUG: Global Post Item: controllerID=1
    SWF DEBUG: Global Post Item: OverrideUploadFolder=assets/Uploads/
    SWF DEBUG: Global Post Item: dataObjectClassName=File
    SWF DEBUG: Global Post Item: parentIDName=ParentID
    SWF DEBUG: Global Post Item: dataObjectFieldName=
    SWF DEBUG: Global Post Item: hasDataObject=0
    SWF DEBUG: Global Post Item: fileClassName=File
    SWF DEBUG: Global Post Item: fileFieldName=Files
    SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://www.****.com/v2_0/FileDataObjectManager_Controller/handleswfupload for File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 29479. Total: 29479
    SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 406.
    SWF DEBUG: Event: uploadComplete : Upload cycle complete.
    Error Code: -200, File name: 07-12-25m.jpg, File size: 29479, Message: 406

  • UncleCheese
    Avatar
    4085 Posts

    Re: FileUploads and the DOM + SWFUpload Link to this post

    HTTP 406 error? Never heard of it. http://www.checkupdown.com/status/E406.html

    Looks like your sever might not allow requests from non-web browsers?

  • kiwiot
    Avatar
    Community Member
    8 Posts

    Re: FileUploads and the DOM + SWFUpload Link to this post

    This is for anyone else out there that may get a 406 error. This has been due to mod_security. Now ordinarily a simple .htaccess override of

    <IfModule security_module>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    or

    <IfModule security2_module>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    should do the job. However after continued HTTP 500 errors I researched more only to find out that ModSecurity 2.x cannot be controlled using .htaccess filles, therefore making the above fixes obsolete.

    The only fix here is to change the httpd.conf to remove the offending rule.

  • UncleCheese
    Avatar
    4085 Posts

    Re: FileUploads and the DOM + SWFUpload Link to this post

    Awesome. Thanks for posting this. The more information we have about this, the better off we all are!

    Mod_security is a tough beast. It's actually not necessary to remove it entirely, although, a lot of people find it's more headaches than its worth, but there are so many ways to configure mod_security, it is possible to get it playing nicely with Flash. All of our sites have mod_security enabled and I've never had an issue. I think our sysadmin just cranks the sensitivity way down. But that's all way beyond me.

    3300 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.