我在我的项目(使用elFiner
连接器)中使用了elFinder,并且在本地主机上工作得很好。
但是当我将它部署到服务器(在线托管)时,它会给我一个错误target dir not found or access denied
。这是我的配置;
<elFinder apiVersion="2.0"
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">
</elFinder>
我相信我的道路在我的web.config中是不正确的。
如何将elFinder
设置为在线(在web上)?
更新:我的在线设置如下;
<elFinder apiVersion="2.0" localFSRootDirectoryPath="\Areas\EmaarAdmin\Content"
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">
我还将权限设置为Read
和Write
发布于 2013-05-08 10:22:51
我用一个简单的技巧解决了这个问题。首先,我编写了以下代码,并将其放入_Layout
(剃刀)文件中。
@HttpContext.Current.Request.PhysicalApplicationPath
这给了我一个物理路径,然后我复制了它,并将它粘贴到localFSRootDirectoryPath
和localFSThumbsDirectoryPath
中,它确实起了作用。
https://stackoverflow.com/questions/16437187
复制相似问题