Please have a look at the symfony unit tests. This should be tested somewhere 
in the form class unit tests. I definitely saw that but I'm too lazy right now 
to have a look, sorry.

Daniel

On Dec 23, 2009, at 3:47 PM, isleshocky77 wrote:

> So I'm just changing the subject on this cause it really is how I can
> get a file which I have passed in as a byteArray from flash to be used
> by a form class. Not sure if I should manually save it to a tmp file
> first and the pass an array to the form class with the proper
> information or there is an easier and cleaner way to do this.
> 
> Thanks for any help.
> 
> --
> Stephen Ostrow
> 
> On Dec 22, 5:56 pm, isleshocky77 <[email protected]> wrote:
>> I'm using ZendAMF with symfony and having a form in flash submit
>> information to a service in symfony. I wanted to know if anyone had
>> best practices for doing something like this.  It does include a file
>> which is where I'm running into the problems.
>> 
>> So far I have this:http://isleshocky77.pastebin.com/f1434534c
>> 
>>   /**
>>    * Uploads an Image and sets its information
>>    *
>>    * @param array     $image_array    The Image which contains all
>> information about the Image
>>    * @param byteArray $image_file     The image file as a byteArray
>>    *
>>    * @todo Complete and test
>>    *
>>    */
>>   public function upload($image_array, $image_file)
>>   {
>>     $ImageForm = new ImageServiceImageForm();
>> 
>>     # Do something with image file
>>     # @todo
>> 
>>     $ImageForm->bind($image, $image_file);
>> 
>>     if ($ImageForm->isValid()) {
>>       $ImageForm->save();
>>       return "Success";
>>     } else {
>>       return "Error";
>>     }
>> 
>>   }
>> 
>> Thanks for any help
>> 
>> --
>> Stephen Ostrow
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to