AJAXForm, execution permissions and thumbnails...
Hi All,
I'm a relative newcomer to jQuery but am loving it so far.
Slight issue. As always, everything will work wonderfully on my own
machine, but bails when I get to running it live...
I'm using an ajaxform to allow users to upload an avatar/image to
their user profiles. For whatever reason, I'm storing the image as a
blob in sql (through Propel). The form itself contains an ajax style
avatar preview, triggered when a file is uploaded to a temporary area,
and a submit button that commits the image to the db - basic idea
being that a user uploads an image, checks it looks okay, then
commits.
Hitting submit calls an ajaxForm postback to my update.php code. I
have a thumbnail class that deals with headers, formats and resizing,
and also *should* save the thumbnailed file. The update code then
opens the thumbnail stream, puts it in a blob and then will eventually
tidy up the temp area.
A sensible person would restrict file size to 120x120px, and bail
otherwise.. however I've always been a glutton for punishment so here
we go...
On my local machine all works fine. On my hosts, the thumbnail isn't
being saved - and so the blob in the db is always null. Originally I
though it was an execution permission, so I made a test page with some
hardcoded values, and lo/behold it all works as intended... which then
boils down to the calling methods. Would ajaxForm do something strange
with file read/write/execute?
Maybe I'm barking up a wrong tree - but any thoughts much appreciated.
Thanks
benw