elfinder 路径修改_设置elFinder对虚拟主机的正确路径(IIS 7+)

i have used elFiner in my project (with elFinder Connector) and works great on localhost.

But when i deploy it to the server (online hosting), It gives me an error target dir not found or access denied. here is my configuration;

localFSRootDirectoryPath="D:\Projects\Emaar\Emaar.Web\Areas\EmaarAdmin\Content\images"

localFSThumbsDirectoryPath="D:\Projects\Emaar\Emaar.Web\Areas\EmaarAdmin\Content\images\.thumbs"

rootDirectoryName="Root"

uploadMaxSize="20M"

defaultVolumeName="LocalFileSystem"

baseUrl="http://localhost:4595/Areas/EmaarAdmin/Content/images/"

baseThumbsUrl="http://localhost:4595/Areas/EmaarAdmin/Content/images/.thumbs/"

duplicateFilePattern="Copy of {0}"

duplicateDirectoryPattern="Copy of {0}"

thumbsSize="48,48">

I believe my path aren't correct in my web.config.

How do i setup the elFinder to work also online (on the web)?

UPDATE: my online settings looks like this;

localFSThumbsDirectoryPath="\Areas\EmaarAdmin\Content\.thumbs"

rootDirectoryName="Root Main" uploadMaxSize="20M" defaultVolumeName="LocalFileSystem"

baseUrl="http://subdomain.domain.com/Areas/EmaarAdmin/Content/"

baseThumbsUrl="http://subdomain.domain.com/Areas/EmaarAdmin/Content/.thumbs/"

duplicateFilePattern="Copy of {0}" duplicateDirectoryPattern="Copy of {0}" thumbsSize="48,48">

i have also set the permission to Read and Write

解决方案

i solved the problem by doing a simple trick. First i have wrote the following code and put it inside the _Layout (razor) file.

@HttpContext.Current.Request.PhysicalApplicationPath

This gave me a physical path and then i just copied it and paste it inside the localFSRootDirectoryPath and localFSThumbsDirectoryPath and it did work

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值