开发者

Getting TinyMCE Tinybrowser to upload directly into CakePHP webroot

开发者 https://www.devze.com 2023-02-12 12:38 出处:网络
I have the Tinybrowser plugin working with TinyMCE for file uploads. Everything is working great so long as I upload into the /app/uploads/ folder. Unfortunately this means that images (etc) aren\'t a

I have the Tinybrowser plugin working with TinyMCE for file uploads. Everything is working great so long as I upload into the /app/uploads/ folder. Unfortunately this means that images (etc) aren't available to display from the application front end. I haven't had any success setting up a symlink between the two locations (php symlink() fails silently) so it looks like my only option is to upload into the /app/webroot/uploads/ directory instead.

The difficulty here is that when the upload path is changed to /app/webroot/uploads/, the application goes into an infinite recursion. I guess this is to do with the .htaccess rules on /webroot/ but I have no idea how to fix it.

Any ideas what the problem might be and what I can do to fix it? Any help appreciated.


.htaccess mod_rewrite is essentially the cakephp default:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}开发者_开发技巧 !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

#far-future caching
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
</FilesMatch>

Options +FollowSymLinks


I think this is only a url problem. The url for the directory /app/uploads/ is specified in the tinymce directory or in the plugin directory. You can change the url.

i got another upload plugin working in tinyMCE and the change of the url is working. I think there is no problem with the .htaccess

0

精彩评论

暂无评论...
验证码 换一张
取 消