Загрузка, обработка, хранение и отдача статики

Embed Size (px)

Text of Загрузка, обработка, хранение и отдача статики

  • 1. , , undev.ru

2. : . . NFS. Amazon S3. Webdav. : . . 3. WEBDAV - , HTTP . . ngx_http_dav_module mod_dav. ZF - Zend_Http_Client. 4. 5. 6. -> VPS -> . Storage . storage nginx ngx_http_dav_module. Create_full_put_path on. Webdav storage. 7. (), . 8. . is_deleted is_ready . id 161/374/000473161 storage . , (), id . 9. , . 10. , (). [user_avatar] resize.big.OutputFileFormat = jpg resize.big.width = 236 resize.big.height = 177 resize.medium.keepFrame = true resize.medium.width = 144 resize.medium.height = 108 11. View Helper . $this->image($avatar_file_id, 'user_avatar', 'big') http://static.starlook.ru/sets-medium-947826- 4fc400fb-image.jpg HTTP_UrlSigner (dklab.ru) avatar_file_id == null, . 12. . . 13. . . nginx, php. . bootstrap ZF). nginx . . 14. . . . ( ). 15. $client = new Ext_Webdav_Client($connect_params); $adapter = new Ext_File_Adapter_Webdav(); $adapter->setClient($adapter); $transfer = new Ext_File_Transfer(); $transfer->setAdapter($adapter); Ext_Form_Element_File::setTransfer($transfer); return $transfer; 16. public function configure(Ext_File $file) { $table = new File(); $row = $table->createRow(); list($row->width, $row->height) = getimagesize($file->getFilePath()); $row->save(); $this->getAdapter()->setUri($this- >generateUri($row->id)); return $row; 17. $element = new Ext_Form_Element_File('files'); $element->setIsArray(true); $element->setConfigurator(new File_Configurator_WebdavDb()); $value = $element->getValue(); foreach ($value as $row) { // processing } 18. ! E-mail: mokevnin@gmail.com : www.wddx.ru twitter.com/mokevnin