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

  • Published on
    16-Jun-2015

  • View
    1.170

  • Download
    5

Embed Size (px)

Transcript

<ul><li> 1. , , undev.ru </li></ul> <p> 2. : . . NFS. Amazon S3. Webdav. : . . 3. WEBDAV - , HTTP . . ngx_http_dav_module mod_dav. ZF - Zend_Http_Client. 4. 5. 6. -&gt; VPS -&gt; . 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-&gt;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-&gt;setClient($adapter); $transfer = new Ext_File_Transfer(); $transfer-&gt;setAdapter($adapter); Ext_Form_Element_File::setTransfer($transfer); return $transfer; 16. public function configure(Ext_File $file) { $table = new File(); $row = $table-&gt;createRow(); list($row-&gt;width, $row-&gt;height) = getimagesize($file-&gt;getFilePath()); $row-&gt;save(); $this-&gt;getAdapter()-&gt;setUri($this- &gt;generateUri($row-&gt;id)); return $row; 17. $element = new Ext_Form_Element_File('files'); $element-&gt;setIsArray(true); $element-&gt;setConfigurator(new File_Configurator_WebdavDb()); $value = $element-&gt;getValue(); foreach ($value as $row) { // processing } 18. ! E-mail: mokevnin@gmail.com : www.wddx.ru twitter.com/mokevnin </p>

Recommended

View more >