Re: image upload via iphone app

2011-03-14 Thread Foroct
It looks like the problem is in this line $this->Drink- >make($file); // generate versions When I set my file upload to $this->data['media'] by stating $this- >data['media'] = $_FILES['media'] ; The media plugin then handles the upload using $file = $this->Drink- >transfer($this->data['media']);

Re: image upload via iphone app

2011-03-13 Thread David Persson
Hi Foroct, I'd need a little more information in order to help you. What does $this->data['media'] looks like *before* you hand it over to ->transfer()? var_dump($this->data['media'])? Also provide var_dump($this->params['form']. Also check var_dump($this->Recipe->Behaviors->Transfer->runtime)

Re: image upload via iphone app

2011-03-13 Thread Foroct
The XHR file upload using PHP to move my file to a set location and save it works well. Really easy as I described earlier, no work around needed. The phone app simply bypasses the view (its there but is a blank file) and the action is handled by the controller. Again the issue is trying to use the

Re: image upload via iphone app

2011-03-12 Thread cricket
On Sat, Mar 12, 2011 at 2:38 PM, Foroct wrote: > I kicked this around for a few days and I still cant make it work. > > My model is "Recipe" and it is using the plugin > var $actsAs = array('Media.Transfer', 'Media.Generator', > 'Media.Coupler'); > When I upload using a form everything is perfect.

Re: image upload via iphone app

2011-03-12 Thread Foroct
I kicked this around for a few days and I still cant make it work. My model is "Recipe" and it is using the plugin var $actsAs = array('Media.Transfer', 'Media.Generator', 'Media.Coupler'); When I upload using a form everything is perfect. >From my app, I'm sending the photo (via XHR) to this con

Re: image upload via iphone app

2011-03-08 Thread David Persson
Hi Foroct, 1. Handling just the file upload: You just posted the file to your action (via XHR) and $this->data['media'] now contains the file upload array. Image is a model available in the controller which has generator and transfer behaviors attached to it. $file = $this->Image->transfer($t

Re: image upload via iphone app

2011-03-05 Thread Foroct
The only thing keeping me from using MediaPlugin in my app_photo() function is that I don't know how (that's what I'm trying to find out). I could return the image.id or the file name as an echo or a JSON response, it is being propegated through the submission stages currently. So, how would I us

Re: image upload via iphone app

2011-03-04 Thread cricket
On Fri, Mar 4, 2011 at 3:57 PM, Foroct wrote: > Sorry this is not clear. > > If you are browsing my site (not using the phone app) and you add data > and a photo via a form field then the image is being handled by the > media plugin. However when adding data and a photo via the iphone app > I am n

Re: image upload via iphone app

2011-03-04 Thread Foroct
Sorry this is not clear. If you are browsing my site (not using the phone app) and you add data and a photo via a form field then the image is being handled by the media plugin. However when adding data and a photo via the iphone app I am not currently handling the photo upload via the media plugi

Re: image upload via iphone app

2011-03-04 Thread cricket
On Fri, Mar 4, 2011 at 1:42 PM, Foroct wrote: > "post it to a URL handled by a controller implementing the uploader," > > This is what I don't know how to do.  Currently the controller is > handling the upload and just placing the file into a folder. You said earlier that "image processing is bei

Re: image upload via iphone app

2011-03-04 Thread Foroct
"post it to a URL handled by a controller implementing the uploader," This is what I don't know how to do. Currently the controller is handling the upload and just placing the file into a folder. My code. function app_photo() { // what layout to use $this-

Re: image upload via iphone app

2011-03-03 Thread cricket
On Thu, Mar 3, 2011 at 9:52 AM, Foroct wrote: > I have a site where a user can upload some text and an image.  The > image processing is being handled using the Media Plugin by David > Persson.  When a user submits a form with an image attached the image > gets crunched to multiple sizes and put i

image upload via iphone app

2011-03-03 Thread Foroct
I have a site where a user can upload some text and an image. The image processing is being handled using the Media Plugin by David Persson. When a user submits a form with an image attached the image gets crunched to multiple sizes and put in the correct folder. For my iphone app I have a simil