We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

I can read from Rackspace but not write [Solved] | Forum

Monica Apr 23 '13
Hi all, I'm setting up a new site and I'd like to move userfile hosting to Rackspace.  I followed the instructions at http://docs.oxwall.org/install:cloud_hosting:rackspace_cloud and moved my few files there using Cyberduck.  The container is public.  My Oxwall site will read from Rackspace to get images without any issues (the images that were originally uploaded the regular way and then manually moved to Rackspace).  However, when I try to upload an image the AJAX progress wheel just keeps spinning at the last step and nothing ever happens -- no error messages or anything.  What should I do?  Thanks for your help!
The Forum post is edited by Alia May 3 '13
Michael I.
Michael I. Apr 24 '13
Monica, please try checking into Firebug or Developer Tool in Chrome for any errors - looks like you have some JS errors that prevent script from proper functioning.
Monica Apr 30 '13

I checked it using Firefox and Firebug but I'm not sure what I'm looking for.  There is a message in the console for Firebug that says that /photo/ajax/submit gets a 302 error, so that's probably the issue.


Also, I tried uploading a new profile avatar and I'm getting a different symptom.  When I try to upload it I get the "Please choose image file" message defined as base+avatar_select_image in the lang_1 file.  I see the same behavior if I try to upload an avatar without first selecting an image on my machine.


Do these symptoms point to a specific issue?

Monica May 2 '13

I managed to find and fix my issue.  In ow_libraries/Rackspace_cloudfiles/cloudfiles.php there is a function named _guess_content_type.  At the end of the function there is a small section that gets called if the script is unable to determine the content type of the file being uploaded.  It looks like this:


if ( !$this->content_type )
            //$this->content_type = 'image/jpeg';
            throw new BadContentTypeException("Required Content-Type not set");


I switched it to this and now it works:


if ( !$this->content_type )
            $this->content_type = 'image/jpeg';
            //throw new BadContentTypeException("Required Content-Type not set");


The exception and its message were never displayed anywhere.  This fix was just a guess that ended up working out for me.  Hopefully it helps someone else.