2009年7月8日星期三

Re: [fw-mvc] Zend_File_Transfer how to create a thumb run time ?

Thanks both for the point and for the lecture ;)
I'm new at zf and always in a hurry :(
Bye
Ps
My name is whisher not wisher ;)

thomasW wrote:
>
> @Wisher:
> It is documented in two different chapters and it's always the first
> paragraph.
>
> When you use a form element look here:
> http://framework.zend.com/manual/en/zend.form.standardElements.html#zend.form.standardElements.file
>
> When you use it manually look here:
> http://framework.zend.com/manual/en/zend.file.html
>
> Note that there are even 2 examples which show how to use it.
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>
> ----- Original Message -----
> From: "whisher" <whisher@mp4.it>
> To: <fw-mvc@lists.zend.com>
> Sent: Wednesday, July 08, 2009 6:05 PM
> Subject: Re: [fw-mvc] Zend_File_Transfer how to create a thumb run time ?
>
>
>>
>>
>>
>> whisher wrote:
>>>
>>>
>>> <p>Hi.</p>
>>> <p>I'm tryng to get a file uploaded by Zend_File_Transfer </p>
>>> <p>to make a thumb but it doesn't work</p>
>>> <pre>
>>> if ($form->file_image->isUploaded()) {
>>> $extra['file_image'] =
>>> $this->_getFileName($form->file_image);
>>> if($form->file_image->isReceived()){exit();
>>> $thumb= new
>>> W_Gd_ImageResize($form->file_image->getDestination().'/'.$extra['file_image']);
>>>
>>> if(!$thumb->create(self::ICO_WIDTH,self::ICO_WIDTH,BASE_PATH.'/thumbs/'.$extra['file_image'])){
>>> //Unknown File Error
>>> }
>>> }
>>> </pre>
>>> <p>The flow code never enter in</p>
>>> <p>if($form->file_image->isReceived())</p>
>>> <p>if I get rid of it I get an error from W_Gd_ImageResize
>>> file not found.</p>
>>> <p>The script work fine (the file is uploaded) but I think
>>> it isn't physically on the server yet.</p>
>>>
>>> <p>So I don't know which way to turn.</p>
>>>
>>> <p>Can you help me, please ?</p>
>>>
>>> <p>Bye.</p>
>>>
>>
>> <p>EDIT</p>
>>
>> <p>I worked out with </p>
>> <p> $form->file_image->receive()<p>
>> <p>It should be highlighted in the reference (imho)</p>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Zend_File_Transfer-how-to-create-a-thumb-run-time---tp24393230p24393276.html
>> Sent from the Zend MVC mailing list archive at Nabble.com.
>
>
>

--
View this message in context: http://www.nabble.com/Zend_File_Transfer-how-to-create-a-thumb-run-time---tp24393230p24399654.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: