Re: [fw-general] Zend Upload
hi gunter, it's not a class, just an action. it works for me: protected function uploadAction() { define ("UPLOADS_PATH", "../uploads/"); $err_msg=""; $html = ""; $name = $_FILES["file"]["name"]; $type = $_FILES["file"]["type"]; $size = round( $_FILES["file"]["size"] / 1024); $tmp_name = $_FILES["file"]["tmp_name"]; $error = $_FILES["file"]["error"]; // if ( $type != "application/pdf" ) $err_msg .= "Not a valid file-type!"; // if ( file_exists(UPLOADS_PATH . $name)) $err_msg .= $name . "already exists.!"; if ( $size > 500 ) $err_msg .= "File bigger than 5MB!"; if ( $error > 0)$err_msg .= "Err.: $error !"; if ( $err_msg != "" ) $err_msg .= "File not uploaded!"; if ( $err_msg == "" ) { $time_stamp = date("y-m-d_H.i.s_"); $store_in = UPLOADS_PATH . $time_stamp . $name; move_uploaded_file( $tmp_name, $store_in); $html = "File sucessfully uploaded! Name:$name Type:$type Size:$size kB "; $this->view->assign('header', "File Upload"); $this->view->assign('content', $html); $this->view->assign('err_msg', $err_msg); } Gunter Sammet wrote: > > Hi all: > Does anybody already have written an upload class for Zend Framework? > If yes, would it be possible to share the code. > Thanks, > > Gunter > > -- View this message in context: http://www.nabble.com/Zend-Upload-tf4786324s16154.html#a13724744 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend Upload
Hi Gunter, See the proposal from Thomas Weidner: http://framework.zend.com/wiki/display/ZFPROP/Zend_Http_Upload+-+Thomas+Weidner Gunter Sammet schreef: Thanks for the info. Will have a look at it down the road. Not for my current project though because the Magento licence doesn't match my desired licencing. On Nov 13, 2007 1:15 AM, Laurent Melmoux <[EMAIL PROTECTED]> wrote: Hi, you can have a look at Varien_File_Uploader in the magento ecommerce platform : http://www.magentocommerce.com/ -- Laurent Melmoux - [EMAIL PROTECTED] Annecy - France Gunter Sammet a écrit : Hi all: Does anybody already have written an upload class for Zend Framework? If yes, would it be possible to share the code. Thanks, Gunter -- Andries Seutens http://andries.systray.be Gecontroleerd op virussen door de JOJO Secure Gateway.
Re: [fw-general] Zend Upload
Thanks for the info. Will have a look at it down the road. Not for my current project though because the Magento licence doesn't match my desired licencing. On Nov 13, 2007 1:15 AM, Laurent Melmoux <[EMAIL PROTECTED]> wrote: > Hi, > > you can have a look at Varien_File_Uploader in the magento ecommerce > platform : http://www.magentocommerce.com/ > > -- > Laurent Melmoux - [EMAIL PROTECTED] > Annecy - France > > > Gunter Sammet a écrit : > > > Hi all: > > Does anybody already have written an upload class for Zend Framework? > > If yes, would it be possible to share the code. > > Thanks, > > > > Gunter > > > > > > >
Re: [fw-general] Zend Upload
Hi, you can have a look at Varien_File_Uploader in the magento ecommerce platform : http://www.magentocommerce.com/ -- Laurent Melmoux - [EMAIL PROTECTED] Annecy - France Gunter Sammet a écrit : Hi all: Does anybody already have written an upload class for Zend Framework? If yes, would it be possible to share the code. Thanks, Gunter
Re: [fw-general] Zend Upload
Thanks Thomas. I saw the proposal. Just been wondering if somebody had some code already. G. On Nov 11, 2007 10:21 AM, Thomas Weidner <[EMAIL PROTECTED]> wrote: > See > http://framework.zend.com/wiki/display/ZFPROP/Zend_Http_Upload+-+Thomas+Weidner > > But the proposal is actually in the review process so there is no finished > code avaiable for now. > > Greetings > Thomas > > > - Original Message - > From: "Gunter Sammet" <[EMAIL PROTECTED]> > To: > Sent: Sunday, November 11, 2007 4:58 PM > Subject: [fw-general] Zend Upload > > > > Hi all: > > Does anybody already have written an upload class for Zend Framework? > > If yes, would it be possible to share the code. > > Thanks, > > > > Gunter > >
Re: [fw-general] Zend Upload
See http://framework.zend.com/wiki/display/ZFPROP/Zend_Http_Upload+-+Thomas+Weidner But the proposal is actually in the review process so there is no finished code avaiable for now. Greetings Thomas - Original Message - From: "Gunter Sammet" <[EMAIL PROTECTED]> To: Sent: Sunday, November 11, 2007 4:58 PM Subject: [fw-general] Zend Upload Hi all: Does anybody already have written an upload class for Zend Framework? If yes, would it be possible to share the code. Thanks, Gunter
[fw-general] Zend Upload
Hi all: Does anybody already have written an upload class for Zend Framework? If yes, would it be possible to share the code. Thanks, Gunter