Groups
Sign in
Groups
CakePHP-ja
Conversations
About
Send feedback
Help
MediaPlugin | MEDIA を APP 外にしたら filter が利かなくなった
20 views
Skip to first unread message
custar
unread,
Jun 14, 2010, 11:21:41 PM
6/14/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CakePHP-ja
MEDIA を以下で変更して、APP 外に置いてみた。
media/config/core.php
---
if (!defined('MEDIA')) {
define('MEDIA', WWW_ROOT . 'media' . DS);
}
そうすると、ファイルは MEDIA に期待通り出来た。
で、サンプルの書き方を真似て
echo $medium->embed(
$medium->file($previewVersion . '/', $item),
array('restrict' => array('image')
));
filter 後、表示させようとすると、画像への適切なパスが生成されない。
画像のパスを生成する際に用いられる webroot が APP/webroot になっており、
APP 外に置いた MEDIA へのパスに置き換えられていないから。
まぁ、自力で解決したのだが、
標準的な使い方の中に、それを解決する方法があるのかもしれない。
何処に書いてあるのだろう?
また、ソースを見なきゃダメかな?
Reply all
Reply to author
Forward
0 new messages